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

TemplateManager Insert Problem

1 Answer 51 Views
Editor
This is a migrated thread and some comments may be shown as answers.
CBARS
Top achievements
Rank 2
CBARS asked on 09 Mar 2009, 04:04 PM

Description: RadEditor's TemplateManager adds a non-existing template into RadEditor.

Problem: The application has a save function that captures RadEditor1's content into an HTML file, "test.html", on the local disk. This file is saved into "~/Templates/test.html". The problem occurs when test.html is edited and reloaded; TemplateManager somehow stores the first copy of test.html and keeps loading it whenever a file named test.html is opened by TemplateManager. test.html can be edited through RadEditor, or Notepad, or even deleted and re-created, but TemplateManager still opens the original copy(which has been deleted and re-created and formatted differently than before).

Code: 
[ASPX]

 

<

 

TemplateManager ViewPaths="~/Templates" />

 

 

[C#]
if

 

 

(e.Argument == "Save")

 

{

 

 

using (StreamWriter saveFile = new StreamWriter(this.MapPath(path), false))

 

{

saveFile.Write(RadEditor1.Content);

}

}


Any help will be greatly appreciated.
Thank you

 

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 12 Mar 2009, 01:16 PM
Hi Marcel,

This is a browser caching problem. You can verify this by opening the saved file in a new window and hitting Ctrl+R or deleting the browser cache and reloading the html file.

You can try to prevent the caching by using the instructions in these articles:
How to prevent caching in Internet Explorer
and
Useful HTML Meta Tags.


Sincerely,
Rumen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Editor
Asked by
CBARS
Top achievements
Rank 2
Answers by
Rumen
Telerik team
Share this question
or