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

JavaScript to Dock Sliding Pane throws ASP Error

1 Answer 54 Views
Splitter
This is a migrated thread and some comments may be shown as answers.
Dennis
Top achievements
Rank 1
Dennis asked on 11 Feb 2008, 05:41 PM
Using the following code (as interpreted from the online docs), I receive Server Error in '/' Application. I take out the JavaScript line, and it works fine. Or, if I put the ClientID into the Page Load and write it to Debug, I can retreive the ID fine. Latest version of the Splitter and VS 2008. Any ideas?

<TelerikWeb:RadSlidingZone ID="OutputPaneSlidingZone" Height="22" DockedPaneId="PaneCompileOutput" SlideDirection="Top" runat="server">

<TelerikWeb:RadSlidingPane ID="PaneCompileOutput" MinHeight="22" Title="Compile Output" OnClientDocked="Pane_OnChange" OnClientResized="Pane_OnChange" OnClientUndocked="Pane_OnChange" OnClientExpanded="Pane_OnChange" OnClientCollapsed="Pane_OnChange" EnableResize="true" runat="server">

var slidingZone = $find("<%= OutputPaneSlidingZone.ClientID %>");

 

Server Error in '/' Application.

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) +2108046
   Telerik.Web.UI.RadAjaxControl.MoveUpdatePanel(Control initiator, Control updated) +207
   Telerik.Web.UI.RadAjaxControl.PerformRender() +403
   Telerik.Web.UI.RadAjaxControl.OnPageRender(HtmlTextWriter writer, Control page) +1473
   Telerik.Web.UI.RadAjaxControl.RenderPageInAjaxMode(HtmlTextWriter writer, Control page) +63
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +98
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +20
   System.Web.UI.Page.Render(HtmlTextWriter writer) +26
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2558

1 Answer, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 12 Feb 2008, 11:08 AM
Tags
Splitter
Asked by
Dennis
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Share this question
or