November Happy Hour will be moved to Thursday December 5th.

Unable to view pages in Edit Mode

Vote:
 

Hi,

I'm trying out migration of our website from EPiServer 4.62 to EPiServer 5, using the technical notes and help through forum. After migration and code fix, I was able to login to the edit mode. But when i try to load an existing page in "View" mode, i get the an error as copied below. I couldn't debug as well.

Can you please let me know if i am missing anything:

The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).]
   System.Web.UI.ControlCollection.Add(Control child) +8680983
   EPiServer.RightClickMenu.Render(Boolean waitForOnLoad) +1583
   EPiServer.RightClickMenu.Render() +33
   EPiServer.Web.PageExtensions.ContextMenu.RenderMenuScripts(Object sender, EventArgs e) +621
   System.EventHandler.Invoke(Object sender, EventArgs e) +0
   System.Web.UI.Control.OnPreRender(EventArgs e) +8686422
   System.Web.UI.Control.PreRenderRecursiveInternal() +80
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842

 

 

#52776
Aug 12, 2011 18:06
Vote:
 

It's exactly what the error says, your page contains code blocks which prevents EPiServer from injecting the right click menu code.

You can easily solve this, either by rewriting your code to use controls instead of codeblocks somehow, or simply move the code blocks into a user control and load that control into the page.

#52777
Aug 13, 2011 9:44
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.