This is a migrated thread and some comments may be shown as answers.

Problem in getting iframe src placed inside raddock

1 Answer 74 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Gaurav
Top achievements
Rank 1
Gaurav asked on 16 Sep 2011, 08:04 AM
Hi,

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?

Thanks

1 Answer, 1 is accepted

Sort by
0
Slav
Telerik team
answered on 21 Sep 2011, 11:54 AM
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,
Slav
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
Tags
Dock
Asked by
Gaurav
Top achievements
Rank 1
Answers by
Slav
Telerik team
Share this question
or