Enhancing ASP.NET Pages with JavaScript
Subject:   Dynamic youtube plugin in with c#
Date:   2008-04-24 06:40:30
From:   Keisham

I have embedded the youtube plugin in the using

<embed id="playvideo" src="" 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 using c#. The difficulty that I face is that <embed> is not a object its HTML, so it is not recognized in the server. How can I go about with this.

golden helping hand needed.


Full Threads Oldest First

Showing messages 1 through 1 of 1.

  • Dynamic youtube plugin in with c#
    2008-04-25 06:33:47  Keisham [View]

    I have found the solution to this, Am posting this to help someone who faces similar problem.

    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.