Article:
 |
|
Enhancing ASP.NET Pages with JavaScript
|
| Subject: |
|
Dynamic youtube plugin in asp.net with c# |
| Date: |
|
2008-04-24 06:40:30 |
| From: |
|
Keisham
|
|
|
I have embedded the youtube plugin in the asp.net using
<embed id="playvideo" src="http://www.youtube.com/v/Y8pAhZUN16c&feature=bz301" pluginspage="application/x-shockwave-flash" width="425" height="355"></embed>.
I want to change the video dynamically, by changing the src=. In Javascript it was quite straightforward.
How can we dynamically update the src= in asp.net using c#. The difficulty that I face is that <embed> is not a asp.net object its HTML, so it is not recognized in the server. How can I go about with this.
golden helping hand needed.
Thanks,
Keisham
|
Showing messages 1 through 1 of 1.
-
Dynamic youtube plugin in asp.net with c#
2008-04-25 06:33:47
Keisham
[View]
you got to create a function say
public void passurl(string url)
{
"<script language=javascript>" +
"document.getElementById('elementID').src='"+ url+ "'; </script>";
page.RegisterStartupScript("put the params here"};
}
call this on some event.
Cheers,
Keisham