Problem in getting iframe src placed inside raddock

2 posts, 0 answers
  1. Gaurav
    Gaurav avatar
    4 posts
    Member since:
    Sep 2011

    Posted 16 Sep 2011 Link to this post


    I have placed an Iframe inside the RadDock dynamically and passing the "src" attribute dynamically with jquery.
    When i want to get the latest src attribute of iframe on server side it returns me the original one .Please suggest what should i do?

  2. Slav
    Slav avatar
    1359 posts

    Posted 21 Sep 2011 Link to this post

    Hi Gaurav,

    Since you are inserting the iframe element programmatically, it should be added in the content of the RadDock on every page load in order to persist it through postbacks. Most probably the iframe's src attribute loses its new value, when the page is reloaded with the original iframe markup.

    You can preserve the needed information through hidden field. When the new src is set on the client, please store the value in a hidden field and then use it on Load event of the page to specify the correct value in the iframe. For your convenience I have attached a sample page, demonstrating the suggested approach. You can use it as a reference for your further development.

    Note that at the current state of affairs I am mostly guessing as to what your setup is. If the solution, presented above, is not applicable in your case, please modify the attached sample so that it matches your scenario. In case this isn't possible, you can also send us a sample, runnable project, isolating the problem, so that we can inspect it locally and suggest a solution.

    Kind regards,
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Back to Top