You can configure these properties when you show a youtube video in your asp.net webpage:
VideoUrl: This property allows you to set URL of the video.
Width: Sets the width of the video player
Height: Set the height of the video player
We use variable youtube url that value initialize at run time. We can set the value of variable by fetch the url that store from data base or by passing page label.
code:
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"> <param name="src" value="<%=youtubeurl %>" /> <embed type="application/x-shockwave-flash" width="425" height="344" src="<%=youtubeurl %>"> </embed> </object>
write the code on your .cs page:
public string youtubeurl; protected void Page_Load(object sender, EventArgs e) { youtubeurl="http://www.youtube.com/v/oZdnezj9Dfg&hl=en&fs=1"; }
Like above code we initialize variable at page load.
i am tried with this code
and no video window also not displaying here.what is the reason
Hello Anu,
Please send us code that ur using now with detail which youtube link ur using like embed link or normal link.
Thanks
pavan