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

Are pages getting cached?

1 Answer 36 Views
HTMLPlaceHolder
This is a migrated thread and some comments may be shown as answers.
Happy
Top achievements
Rank 1
Happy asked on 12 May 2010, 04:31 PM
I've made a Silverlight HtmlEditor control that inherits from RadHtmlPlaceHolder. This loads an editor.aspx page that uses the ajax RadEditor. When that page loads, it makes a call back to the siliverlight host HtmlEditor control to get the html to edit. When I save from my silverlight app, the HtmlEditor control makes a call to that page to get updated html.

I was using the following code to get the html FROM the page

HtmlElement iframe = (HtmlElement)this.HtmlPresenter.Children[0];  
// Set an ID to the IFrame so that can be used later when calling the javascript   
iframe.SetAttribute("id", "myIFrame");  
string code = "document.getElementById('myIFrame').contentWindow.GetEditor().get_html();";      
string html = (string)HtmlPage.Window.Eval(code); 

However, I was having an odd issue. The first time I editted some content, it would work. Then after, every other time I tried to edit content, while the correct content would appear in the editor, the changes actually saved (that is the html returned from the page) was always the same text as the very first time I had editted.

I made a change to the above code to always uniquely name the frame

string guid=Guid.NewGuid().ToString().Replace("-","");  
HtmlElement iframe = (HtmlElement)this.HtmlPresenter.Children[0];  
// Set an ID to the IFrame so that can be used later when calling the javascript   
iframe.SetAttribute("id", guid);  
string code = "document.getElementById('"+guid+"').contentWindow.GetEditor().get_html();";  
string html = (string)HtmlPage.Window.Eval(code);  
 

and now I'm always getting back the correct updated hml.

This makes it seem like everytime I open a new window with a RadHtmlPlaceHolder control, that even after I close that window, that something is getting cached or not cleaned up.

Any ideas?

1 Answer, 1 is accepted

Sort by
0
Miro Miroslavov
Telerik team
answered on 17 May 2010, 09:24 AM
Hi Happy,

As i understand, you put a HtmlPlaceHolders in RadWindow? In that case you're right that we didn't clean-up the Html after you close the Window so the frames remains there. We've logged that bug and should be fixed soon. Till then hope your workaround will work fine.
Sorry for any inconvenience.

All the best,
Miro Miroslavov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
HTMLPlaceHolder
Asked by
Happy
Top achievements
Rank 1
Answers by
Miro Miroslavov
Telerik team
Share this question
or