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

[Solved] RadAjaxPanel - script controls cannot be registered before prerender

1 Answer 213 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
AlanP
Top achievements
Rank 1
AlanP asked on 10 Mar 2008, 12:01 PM
Hi,

I receive the following error:

invalid operation exception 
 
error message  = script controls cannot be registered before prerender 
 
   at System.Web.UI.ScriptControlManager.RegisterScriptControl[TScriptControl](TScriptControl scriptControl) 
   at System.Web.UI.ScriptManager.RegisterScriptControl[TScriptControl](TScriptControl scriptControl) 
   at Telerik.Web.UI.RadAjaxPanel.OnPreRender(EventArgs e) 
   at System.Web.UI.Control.PreRenderRecursiveInternal() 
   at System.Web.UI.Control.PreRenderRecursiveInternal() 
   at System.Web.UI.Control.PreRenderRecursiveInternal() 
   at System.Web.UI.Control.PreRenderRecursiveInternal() 
   at System.Web.UI.Control.PreRenderRecursiveInternal() 
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 
 
 


when referencing the following page:

     <%@ Page Language="vb" AutoEventWireup="false" MasterPageFile="../StandardTemplate.master" CodeBehind="CheckReq.aspx.vb" Inherits="Asi.AP.Web.CheckReq" %> 
 
<asp:Content id="body" contentPlaceHolderID="body" runat="server"
     <asp:ScriptManager ID="ScriptManager1" runat="server"/> 
      
 
    <telerik:RadAjaxPanel id="ajaxPanel" width="95%" runat="server" > 
         <asp:Button id="complete" style="display:none" runat="server" /> 
          
         <asp:Panel id="validationSummaryPanel" visible="false" runat="server" >   
                <spring:ValidationSummary id="validationSummary" runat="server" /> 
         </asp:Panel> 
          
          <radts:RadTabStrip id="RadTabStrip1" runat="server" skinspath="/lxr2005/asi.ap.web/web/images/radskins/radtabstrip" 
          Skin="Office2007" MultiPageID="RadMultiPage1" 
                    SelectedIndex="0"
                <Tabs> 
                    <radts:Tab Text="Check Request" ></radts:Tab> 
                    <radts:Tab Text="Allocations" ></radts:Tab> 
                </Tabs> 
           </radts:RadTabStrip> 
                
           <radts:RadMultiPage ID="RadMultiPage1" width="95%" SelectedIndex="0" runat="server"
            
               <radts:PageView ID="PV1" runat="server"
                
 
                    <asi:ItemList id="L0" runat="server" /> 
 
                
               </radts:PageView> 
                
               <radts:PageView ID="PageView1" runat="server"
                
                   <asi:AllocationGrid id="AG"  runat="server" /> 
                    
               </radts:PageView> 
                
           </radts:RadMultiPage> 
          
        <asi:ActionBar id="actionBar"  runat="server" /> 
         
    </telerik:RadAjaxPanel> 
   
</asp:Content> 

The ItemList control is the problem. This control is a server control that creates many nested controls based on an xml definition. When I nest this control inside an asp:Panel, the problem goes away. However, when building the radstrip and pageviews in code, the problem remains even if I nest the ItemList in a Panel,  so it seems that there is a subtle difference between asp.net creation and building the controls at page init. What is the root problem here?

Thanks,

Alan Polk

1 Answer, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 11 Mar 2008, 09:18 AM
Hello AlanP,

Can you verify that this works properly when using asp:UpdatePanel? RadAjax Prometheus is built on top of MS AJAX and if this is not supported by it - it would not work with our Ajax either.

Greetings,
Steve
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Ajax
Asked by
AlanP
Top achievements
Rank 1
Answers by
Steve
Telerik team
Share this question
or