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

The Controls collection cannot be modified because the control contains code blocks

1 Answer 295 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Joey
Top achievements
Rank 1
Joey asked on 09 May 2008, 03:57 AM

I just upgraded my web site from from version 1.7.2.0 to version 2008.1415 of RadControls for ASP.Net Ajax and now I get this... There are no <script/> tags in my <head/> control. This is clearly an issue with the radcontrols. What is the fix?

The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[HttpException (0x80004005): The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).]
   System.Web.UI.ControlCollection.AddAt(Int32 index, Control child) +218
   Telerik.Web.UI.RadAjaxControl.MoveUpdatePanel(Control initiator, Control updated) +171
   Telerik.Web.UI.RadAjaxControl.PerformRender() +373
   Telerik.Web.UI.RadAjaxControl.OnPageRender(HtmlTextWriter writer, Control page) +1311
   Telerik.Web.UI.RadAjaxControl.RenderPageInAjaxMode(HtmlTextWriter writer, Control page) +152
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +129
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +53
   System.Web.UI.Control.Render(HtmlTextWriter writer) +31
   System.Web.UI.Page.Render(HtmlTextWriter writer) +39
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +74
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +290
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +48
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5390

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 09 May 2008, 10:23 AM
Tags
Menu
Asked by
Joey
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or