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

Editor requests the page again for every instance of the editor on the page

2 Answers 28 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Eddy
Top achievements
Rank 1
Eddy asked on 30 Jan 2009, 02:51 PM
Hello,

We just put in place the editor in one of our production portals. Unfortunately, for every instance of the control we have on the page, it seems to make an additional page requests to the server. For instance, if we place 4 editor controls on the page, the page calls the "Page_Load" event 4 additional times. This behavior affects the logic we current have in place. Is there a way to prevent this from happening?

I've searched through the knowledge base and the forums posts and didnt find a clear answer to this issue. Below is control markup we are currently implementing.

<telerik:RadEditor ID="CompanyOverviewRadEditor" runat="server"
 ToolsFile="~/AdminResources/Editor/JobOpenings.xml" 
 ContentAreaCssFile='<%# string.Format("/Resources/{0}/EditorStyles.css", CurrentWebsite.Id) %>' 
 DocumentManager-ViewPaths='<%# new string[] {string.Format("/Resources/{0}/FileRepository/", CurrentWebsite.Id)} %>' 
 DocumentManager-UploadPaths='<%# new string[] {string.Format("/Resources{0}/FileRepository/", CurrentWebsite.Id)} %>' 
 DocumentManager-DeletePaths='<%# new string[] {string.Format("/Resources{0}/FileRepository/", CurrentWebsite.Id)} %>' 
 ImageManager-ViewPaths='<%# new string[] {string.Format("/Resources/{0}/FileRepository/", CurrentWebsite.Id)} %>' 
 ImageManager-UploadPaths='<%# new string[] {string.Format("/Resources/{0}/FileRepository/", CurrentWebsite.Id)} %>' 
 ImageManager-DeletePaths='<%# new string[] {string.Format("/Resources{0}FileRepository/", CurrentWebsite.Id)} %>' 
 Height="250px" 
 Content='<%# Bind("CompanyOverview") %>'
 <CssFiles> 
   <telerik:EditorCssFile Value="" /> 
 </CssFiles>                  
</telerik:RadEditor> 


Thanks.

2 Answers, 1 is accepted

Sort by
0
Tervel
Telerik team
answered on 02 Feb 2009, 04:01 PM
Hi Eddy,

The problem is most likely in the following line:
 <CssFiles>
   <telerik:EditorCssFile Value="" />
 </CssFiles>                 
</telerik:RadEditor>

Basically, here you are not instructing the editor to load no CSS files, but to load a CSS file with the relative path of "" - which happens to be the current page - so an additional request is made.

If you wish to prevent the editor from copying the parent page CSS, I suggest you set the path to some empty (or even non-existent CSS file, e.g.)

<telerik:EditorCssFile Value="fake.css" />

This should prevent the page from being requested from the browser a second time.


Kind regards,
Tervel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Eddy
Top achievements
Rank 1
answered on 06 Feb 2009, 10:11 PM
Tervel,

Thanks for your prompt reply to this issue. The problem was due to the lines you specified being defined in our project skin file. We removed the lines and kept our markup the same and everything works fine.

Thanks again,

Eddy
Tags
Editor
Asked by
Eddy
Top achievements
Rank 1
Answers by
Tervel
Telerik team
Eddy
Top achievements
Rank 1
Share this question
or