Video is not playing in asp.net web page - asp.net

I downloaded a media player control from the Net then added in my toolbox. Then I drag-and-dropped it to my web page but it's not working...
cc1:Media_Player_Control ID="Media_Player_Control1" runat="server"
MovieURL="./video/yaarian.wmv"
this is my code

Make sure that the path is correct
e.g.
remove ./ if video is located in the child folder named video
or use absolute path e.g. /pages/video/yaarian.wmv

Check the control registration tag and make sure you have the assembly loaded in your bin folder:
<%# Register TagPrefix="cc1" Namespace="MyApp.Controls" Assembly="MyApp" %>
Then, try the following:
<cc1:Media_Player_Control ID="Media_Player_Control1" runat="server"
MovieURL="~/video/yaarian.wmv" runat="server" />

Related

How do I set the default language for the HtmlEditorExtender (AJAX Control Toolkit)?

I'm trying to implement the HtmlEditorExtender from AJAX Control Toolkit.
Is it possible to change the control language? I'd want the language to be French. I have no problem at all changing the language of the CalendarExtender control, but it doesn't work at all with the HtmlEditorExtender. For example, the control still display English words like "Font" and "Size".
I have done everything that is suggested on the web to change the language.
The globalization culture is set in the web.config:
globalization uiCulture="fr" culture="fr-CA" fileEncoding="utf-8"
I have a script manager in the master page and the EnableScriptGlobalization and EnableScriptLocalization are both set to true:
asp:ScriptManager ID="ScriptManager1" runat="server" EnableScriptGlobalization="true"
EnableScriptLocalization="true" ScriptMode="Release" AsyncPostBackTimeOut="0"/>
The culture is set on the page:
%# Page Language="C#" MasterPageFile="~/FullForm.master" AutoEventWireup="true" Culture="fr-CA" UICulture="fr"
Inherits="LAC.WebApp.Management.Parameters.ParametersPage" meta:resourcekey="Page" CodeBehind="Parameters.aspx.cs" %
I have a "fr" folder in the bin folder with the AjaxControlToolkit.resources.dll file in it.
I tried to run the application in release mode but it didn't change anything at all.
If you have any idea, please share it!
Thank you
HtmlEditorExtender is not localized. These strings are hardcoded.
So, the only option at the moment is to change it in source code and make a custom build.

Image from Master Page Disappears when Putting .aspx Page in a Folder

I know this is probably a stupid question but I can't find anything on here about it. I have a master page in the root of my solution explorer and just put an .aspx page in a new folder. The master page is referencing an image in another folder and when I preview the page, it's a broken image. What do I have to do to have the page load the image from a master page? Thanks
You must use relative path. Below is an example:
<asp:Image ImageUrl="~/Images/orderedList1.png" runat="server" />
<img src="~/Images/orderedList0.png" runat="server" />
Don't forget to add runat="server" if you don't use asp.net control
Well, by not posting the markup with the reference to the image, you leave us to guess what's happening.
But how about this: you only have a partial (relative) path to the image, and that path is not valid from the location of your aspx file.
Did I guess right?
You may be referencing the image with no path.
When a child page is loaded in a MasterPage, the "current" directory changes to the child page's directory. So the relative path has changed.

How to force update .ascx file content in Website project

I have Website project, which contains some .ascx and .aspx files. I have added new element <asp:TextBox ID="tb1" runat="server" ... /> in .ascx file and I have wrote some code in proper .ascx.cs file using this element: tb1.Text = "SomeText";. When I compile this project I recieve following error: The name 'tb1' does not exist in the current context.
How can I force to refresh markup of .ascx page? I use Website project and I cannot to change its type to Webapplication.
UPD: I have Website project, which has NOT .ascx.designers.cs files. And I cannot change type of my project to web application.
Unless there's something else happening here, it sounds like the designer.cs file might be out of sync. Try cutting and pasting the control back into the markup, or go into the designer file for the user control and add the TextBox manually:
protected global::System.Web.UI.WebControls.TextBox tb1;
It seems like your design file is not connecting with your code behind file.
Can you confirm if you are defining it as follows,
<%# Control Language="C#" AutoEventWireup="true" CodeBehind="yourcontrol.ascx.cs" Inherits="CompleteNameSpace.ClassName" %>

Changing CK editor filder

I created a asp.net web application and then I downloaded ckeditor. And I extracted my application directory this editor folder. And I added dll of ckeditor to reference of my application. I registered in my web page.
<add tagPrefix="CKEditor" assembly="CKEditor.NET" namespace="CKEditor.NET"/>
I can use ck editor as well. But when I put ckeditor to child folder, I didn't use ckeditor.
root
MyDefault.aspx
MyEditor
ckeditor folder
I want to use like this. How could I do that.
I used ckeditor in my website...
I set it rootforlder/js/ckeditor(folder)
I add below tag in page where I used ckeditor.
<%# Register Assembly="CKEditor.NET" Namespace="CKEditor.NET" TagPrefix="CKEditor" %>
I used ckeditor control like below...
<CKEditor:CKEditorControl ID="ckService" runat="server" Height="200px" Width="400px" BasePath="~/js/ckeditor/"></CKEditor:CKEditorControl>
I hope this will help you... please, let me know.. if you want any help regarding it.

Register User Control Issue

I have a user control registered at the top of my page:
<%# Register Src="/Controls/User/Navbar.ascx" TagName="Navbar" TagPrefix="pmc" %>
and I reference it in my page like this:
<pmc:Navbar runat="server" id="navbar"></pmc:Navbar>
but it does not know what <pmc:Navbar is. I cannot figure out why.
I'm using VS 2008, in a Web Application Project.
Maybe you should specify the path with ~: ... Src="~/Controls/User/Navbar.ascx" ...
Remove either the initial slash from the path to the control, or better still, prefix it with "~" :
<%# Register Src="Controls/User/Navbar.ascx" TagName="Navbar" TagPrefix="pmc" %>
or
<%# Register Src="~/Controls/User/Navbar.ascx" TagName="Navbar" TagPrefix="pmc" %>
The first solution is flakey as it relies on the page existing in the root folder and the control existing below it. The second is the preferred as it will work from any page in your project.
You should also consider registering your user controls in your web.config, as it keeps things much neater, and tends to avoid path issues a little better.

Resources