Need help in some cases I getting System.ArgumentException: Script control '' is not a registered script control.

12 posts, 0 answers
  1. Raimondas Kvietkauskas
    Raimondas Kvietkauskas avatar
    2 posts
    Member since:
    Sep 2006

    Posted 08 Oct 2008 Link to this post

    Hello,

    I using in my application some form RadAjaxPannels, and in some cases I getting interesting exceptions susch as:

    Exception Details: System.ArgumentException: Script control '' is not a registered script control. Script controls must be registered using RegisterScriptControl() before calling RegisterScriptDescriptors().
    Parameter name: scriptControl

    ArgumentException: Script control '' is not a registered script control. Script controls must be registered using RegisterScriptControl() before calling RegisterScriptDescriptors().
    Parameter name: scriptControl]
       System.Web.UI.ScriptControlManager.RegisterScriptDescriptors(IScriptControl scriptControl) +455
       System.Web.UI.ScriptManager.RegisterScriptDescriptors(IScriptControl scriptControl) +52
       Telerik.Web.UI.ProxyScriptControl.Render(HtmlTextWriter writer) +53
       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.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +199
       System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +20
       System.Web.UI.Control.Render(HtmlTextWriter writer) +7
       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.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +199
       System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +20
       System.Web.UI.UpdatePanel.RenderChildren(HtmlTextWriter writer) +236
       System.Web.UI.Control.Render(HtmlTextWriter writer) +7
       System.Web.UI.UpdatePanel.Render(HtmlTextWriter writer) +32
       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
       Telerik.Web.UI.PreControlToAjaxify.Render(HtmlTextWriter writer) +117
       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.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +199
       System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +20
       System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) +7
       System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +29
       Telerik.WebControls.PageView.Render(HtmlTextWriter writer) +405
       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.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +199
       System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +20
       System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) +7
       System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +29
       Telerik.WebControls.RadMultiPage.Render(HtmlTextWriter output) +191
       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.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +199
       System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +20
       System.Web.UI.WebControls.TableCell.RenderContents(HtmlTextWriter writer) +97
       System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +29
       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.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +199
       System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +20
       System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) +7
       System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +29
       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.WebControls.Table.RenderContents(HtmlTextWriter writer) +536
       System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +29
       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.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +199
       System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +20
       System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) +7
       System.Web.UI.WebControls.FormView.Render(HtmlTextWriter writer) +57
       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.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +199
       System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +20
       System.Web.UI.Control.Render(HtmlTextWriter writer) +7
       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.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +199
       System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +20
       System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) +7
       System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +29
       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.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +199
       System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +20
       System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +29
       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.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +199
       System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +20
       System.Web.UI.HtmlControls.HtmlTableRow.RenderChildren(HtmlTextWriter writer) +47
       System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +29
       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.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +199
       System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +20
       System.Web.UI.HtmlControls.HtmlTable.RenderChildren(HtmlTextWriter writer) +47
       System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +29
       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.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +199
       System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +20
       System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +29
       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
       ASP.masterpages_externalmasterpage_master.__Renderform1(HtmlTextWriter __w, Control parameterContainer) in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\reaturnenterprise\86c00cfc\2f2b4d2e\App_Web_nzglisbk.1.cs:0
       System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +98
       System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +20
       System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +59
       System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +68
       System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
       System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
       System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +37
       System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +199
       System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +20
       System.Web.UI.Control.Render(HtmlTextWriter writer) +7
       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.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +199
       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
       Telerik.Web.UI.RadAjaxControl.RenderPageInAjaxMode(HtmlTextWriter writer, Control page) +619
       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
       Telerik.Web.UI.RadAjaxControl.RenderPageInAjaxMode(HtmlTextWriter writer, Control page) +619
       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
       Telerik.Web.UI.RadAjaxControl.RenderPageInAjaxMode(HtmlTextWriter writer, Control page) +619
       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

    I don't know what exactly can be wrong because I reviewed my code it seems all looks quite good. Also I used same functionality with RadControls for asp.net it working good, and when migrated to the RadControls for ASPNET AJAX I encountered with such problems in forms where used rad ajax. And in some scenariuos it works fine, but sometimes crashes hard to predict when and why it crashes.
    So maybe you could help me with that problem.
    I can only copy code of one of my forms where I getting exception, because whole system is hudge enough. I am using ms web clint factory for client and for services web service factory. Is it can affet somehow ajax ?
    So here it is code of one form:
    Aspnet:

     

     

     

    <%

    @ Page Language="C#" AutoEventWireup="true" Inherits="Reaturn_Client_Modules_CashFlowForecast_CfPlanningGeneral_Edit"  Title="Untitled page" MasterPageFile="~/MasterPages/ExternalMasterPage.master" Codebehind="Edit.aspx.cs" %>

    <%

    @ Import namespace="Telerik.Web.UI"%>

    <%

    @ Register Namespace="Telerik.WebControls" Assembly="RadTabStrip.Net2" TagPrefix="radTS" %>
    <%
    @ Import namespace="Resources"%>
    <
    asp:Content ID="Content1" ContentPlaceHolderID="DefaultContent" Runat="Server">
    <pp:ObjectContainerDataSource ID="CfPlanningGeneralContainerDataSource" runat="server" DataObjectTypeName="CashFlowCalculation.DataContracts.CfPlanningGeneralFull" />
    <pp:ObjectContainerDataSource ID="PropertyDataSource" runat="server" DataObjectTypeName="PropertyPortfolio.DataContracts.PropertySmall" />

    <pp:ObjectContainerDataSource ID="QualificationsDataSource" runat="server" DataObjectTypeName="PropertyPortfolio.DataContracts.QualificationSmall" />
    <rea:DataFormView ID="FormView1" runat="server" DataSourceID="CfPlanningGeneralContainerDataSource" DefaultMode="Edit" DataKeyNames="Id">

    <EditItemTemplate>
    <asp:HiddenField ID="VersionField" runat="server" Value='<%# Bind("Version") %>' />
    <radTS:RadTabStrip ID="RadTabStrip1" runat="server" SelectedIndex="0" Skin="Outlook" MultiPageID="RadMultiPage1">
    <Tabs>
    <radTS:Tab runat="server" Text="<%$ Resources:pageresources, CfPlanningGeneralEdit_GeneralDataTab %>" ID="GeneralDataTab">
    </radTS:Tab>
    <radTS:Tab runat="server" Text="<%$ Resources:pageresources, CfPlanningGeneralEdit_PropertyTab %>" ID="PropertyTab">
    </radTS:Tab>
    </Tabs>
    </radTS:RadTabStrip>
    <radTS:RadMultiPage ID="RadMultiPage1" runat="server" BackColor="WhiteSmoke" BorderColor="Gainsboro"

    BorderStyle="Solid" BorderWidth="1px" SelectedIndex="0" Height="225px" Width="400">

    <radTS:PageView ID="PageView1" runat="server">

    <table width="100%">
    <tr>
    <td>
    <asp:Label ID="CashFlowVersionLabel" runat="server" Text="<%$ Resources:entityfieldresources, CfPlanningGeneral_CfVersion %>" SkinID="SmallLabel"></asp:Label></td>
    <td>
    <asp:TextBox ID="CashFlowVersionTextBox" runat="server" Width="200px" Text='<%# Bind("CashFlowVersion") %>' ></asp:TextBox>
    <ppv:PropertyProxyValidator
    ID="PropertyProxyValidator1"
    runat="server"
    ControlToValidate="CashFlowVersionTextBox"
    PropertyName="CashFlowVersion"
    RulesetName=""
    Display="None"
    DisplayMode="List"
    SourceTypeName="CashFlowCalculation.DataContracts.CfPlanningGeneralFull">
    </ppv:PropertyProxyValidator>
    </td>
    </tr>
    <tr>
    <td>
    <asp:Label ID="StartMonthLabel" runat="server" Text="<%$ Resources:entityfieldresources, CfPlanningGeneral_StartMonth %>" SkinID="SmallLabel"></asp:Label></td>
    <td>
    <rea:MonthChooser
    AssemblyName="CashFlowCalculation.DataContracts"
    ID="StartMonthChooser"
    runat="server"
    SelectedMonth='<%# Bind("StartMonth") %>'
    SourceTypeNameForValidation="CashFlowCalculation.DataContracts.CfPlanningGeneralFull"
    PropertyNameForValidation="StartMonth"
    />
    </td>
    </tr>
     
    <tr>

    <td>

    <asp:Label ID="TermLabel" runat="server" SkinID="SmallLabel" Text="<%$ Resources:entityfieldresources, CfPlanningGeneral_Term %>"></asp:Label></td>

    <td>

    <telerik:RadNumericTextBox ID="TermTextBox" runat="server" Width="200px" Text='<%# Bind("Term") %>' NumberFormat-DecimalDigits="0" NumberFormat-GroupSeparator="" Type="Number" MinValue="0">

    </telerik:RadNumericTextBox>

    <ppv:PropertyProxyValidator

    ID="PropertyProxyValidator2"

    runat="server"

    ControlToValidate="TermTextBox"

    PropertyName="Term"
     
    RulesetName=""
    Display="None"

    DisplayMode="List"
    SourceTypeName="CashFlowCalculation.DataContracts.CfPlanningGeneralFull"

    OnValueConvert="OnTermValueConvert">
    </ppv:PropertyProxyValidator>
    </td>
    </tr>
    </table>
    </radTS:PageView>
    <radTS:PageView ID="PageView2" runat="server">
    <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="AjaxLoadingPanel1">
    <table width="100%">
    <tr>
    <td colspan="2">
    <asp:Label ID="SelectPropertiesLabel" runat="server" SkinID="SmallLabel" Text="<%$ Resources:pageresources, CfPlanningGeneralEdit_SelectPropertiesLabel %>"></asp:Label></td>
    </tr>
    <tr>
    <td style="padding-right: 3px" colspan="2">
    <asp:Panel ID="PropertyPanel" runat="server" BackColor="White" BorderColor="#7F9DB9" BorderWidth="1px"
    Height="148px" ScrollBars="Auto" Width="100%">
    <%

    --<asp:UpdatePanel runat="server" ID="UpdatePanel1" UpdateMode="Conditional">
    <Triggers>

    <asp:AsyncPostBackTrigger ControlID="SelectAllButton" />

    <asp:AsyncPostBackTrigger ControlID="DeselectAllButton" />

    <asp:AsyncPostBackTrigger ControlID="QualificationComboBox" />

    </Triggers>

    <ContentTemplate>--

     

     

    %>
    <asp:CheckBoxList ID="PropertyCheckBoxList" runat="server" DataSourceID="PropertyDataSource"
    DataTextField="Name" DataValueField="Id" RepeatColumns="2">
    </asp:CheckBoxList>
    <%

    --</ContentTemplate>
     

    </asp:UpdatePanel>--

    %>
     

    </asp:Panel>
     

    </td>
    </tr>
    <tr>
    <td style="width:70px">
    <asp:Label ID="QualificationLabel" runat="server" Text="<%$ Resources:pageresources, QualificationLabel %>" SkinID="SmallLabel"></asp:Label>
    </td>
    <td align="left">
    <rea:ReaturnComboBox ID="QualificationComboBox" runat="server" AutoPostBack="True"
    DataTextField="Name" DataValueField="Id" DataSourceID="QualificationsDataSource"
    Width="150px" MarkFirstMatch="True" Height="200px"
    SourceTypeNameForValidation="PropertyPortfolio.DataContracts.QualificationSmall"
    PropertyNameForValidation="Name"

    OnSelectedIndexChanged="PropertyComboBox_SelectedIndexChanged"

    NoneItemText="<%$ Resources:global, ShowAll %>" />

    </td>
     
    </tr>

    <tr>

    <td style="padding-bottom: 5px" colspan="2">
     
    <asp:Button ID="SelectAllButton" CausesValidation="false" runat="server" Text="<%$ Resources:global, SelectAll %>" OnClick="SelectAllButton_Click" />

    <asp:Button ID="DeselectAllButton" CausesValidation="false" runat="server" Text="<%$ Resources:global, DeselectAll %>" OnClick="DeselectAllButton_Click" /></td>

    </tr>

    </table>

    </telerik:RadAjaxPanel>
     
    </radTS:PageView>
     
    </radTS:RadMultiPage>
     
    <telerik:RadAjaxLoadingPanel ID="AjaxLoadingPanel1" runat="server">

    <img alt="" src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading2.gif") %>' style="margin-top: 40px;" />

    </telerik:RadAjaxLoadingPanel>
     
    </EditItemTemplate>
    </rea:DataFormView>

    </
    asp:Content>

     

  2. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 10 Oct 2008 Link to this post

    Hello Raimondas,

    From your code snippets I see that you commented an MS UpdatePanel instance and replaced it with RadAjaxPanel. Do you receive the same error with the UpdatePanel? I am asking this question because our RadAjaxPanel is based on it and the exception might be rather a generic one with this configuration.

    If the problem surfaces only when using our RadAjaxPanel, the best means to progress in our investigation is to isolate a stripped working version of your project and send it enclosed to a formal support ticket. We will examine your complete code logic and will get back to you with more info on the matter.

    Best regards,
    Stephen
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Marian
    Marian avatar
    3 posts
    Member since:
    May 2008

    Posted 10 Nov 2008 Link to this post

    The same issue here. Standard UpdatePanel works but RadAjaxPanel always fails. To reproduce:
    Add RadAjaxPanel to standard FormView EditTemplate. And bind values to FormView.
    First time you hit edit state of FormView everything go ok. But If you try to bind new values, then same error as above occurs.
  5. Rosen
    Admin
    Rosen avatar
    3234 posts

    Posted 13 Nov 2008 Link to this post

    Hello Marian,

    Indeed you are correct about this behavior. I suspect that it is caused by the fact that every control which implements IScriptControl should be registered with the ScriptManager, however when this control is moved to another control's collection (in your case when the FormView is rebound) the ScriptManager "registration" is not updated, which points to the control which do not exists anymore. In order to workaround this behavior you can update the entire FormView control or you can use RadAjaxManager and set the ajaxsetting for the nested control on Page's PreRender event. I have attached a simple page which demonstrates this later approach.
    Please give ti a try and let us know if this helps.

    All the best,
    Rosen
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  6. Marian
    Marian avatar
    3 posts
    Member since:
    May 2008

    Posted 13 Nov 2008 Link to this post

    Thanx, I'm already using RadAjaxManager, but this was specific thing, because RadAjaxPanel was placed in user control which might or might not be placed on page with ScriptManager.

    Thanx anyway, I replaced RadAjaxPanel with UpdatePanel and it works.
    Reason why I just posted reply is that you can reproduce this bug and of course this was one of the first items in google when I try to search for workaround, so anyone now can solve this problem;)
  7. Richardsonke
    Richardsonke avatar
    93 posts
    Member since:
    Jul 2007

    Posted 07 Jan 2009 Link to this post

    I'm having the same problem, formview and everything, however my formview is in a user control, which does not seem to have the OnPreRenderCompleted event.  I tried to add the code in the example to the PreRender event, but this does not seem to work.  Do you have any reccomendations?  Thanks.

    -Keith
  8. Rosen
    Admin
    Rosen avatar
    3234 posts

    Posted 08 Jan 2009 Link to this post

    Hi Richardsonke,

    In cases like yours, where a user control is used, you can try moving the code to UserControl's PreRender event. Similar to the following:

        protected override void OnPreRender(EventArgs e)  
        {  
            Control control = FormView1.FindControl("Panel1");  
            RadAjaxManager1.AjaxSettings.AddAjaxSetting(control, control);  
            base.OnPreRender(e);  
        } 

    Please give it a try and let us know about the result.

    Regards,
    Rosen
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  9. Richardsonke
    Richardsonke avatar
    93 posts
    Member since:
    Jul 2007

    Posted 08 Jan 2009 Link to this post

    Yes, I've tried the OnPreRender event of the user control, but I get the same error.  Any ideas?  Thanks.

    -Keith
  10. Rosen
    Admin
    Rosen avatar
    3234 posts

    Posted 09 Jan 2009 Link to this post

    Hi Richardsonke,

    I'm afraid that I'm unable to reproduce the behavior you have described. I have attached a modified version of the page. Please take a look and let me know if I'm missing something obvious.

    Best wishes,
    Rosen
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  11. Richardsonke
    Richardsonke avatar
    93 posts
    Member since:
    Jul 2007

    Posted 12 Jan 2009 Link to this post

    Sorry, I oversimplified what I was trying to do because I misunderstood where the issue was coming from.  It seems that the problem is that I have a RadAjaxPanel inside of my form view (full disclosure: the RadAjaxPanel is actually inside of a user control that's inside of the formview template).  To reproduce this, you just have to modify your previous solution to change the WebUserControl.ascx file to look like this:

    <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">  
        <asp:FormView runat="server" ID="FormView1" DefaultMode="Edit">  
            <EditItemTemplate> 
                <asp:Panel runat="server" ID="Panel1">  
                    <asp:Button runat="server" ID="Button1" OnClick="Button1_Click" /><br /> 
                    <telerik:RadAjaxPanel ID="RadAjaxPanel2" runat="server">  
                        text  
                    </telerik:RadAjaxPanel> 
                </asp:Panel> 
            </EditItemTemplate> 
        </asp:FormView> 
    </telerik:RadAjaxPanel> 
     

    You will then receive the following error when clicking the button: 

    System.ArgumentException: Script control '' is not a registered script control. Script controls must be registered using RegisterScriptControl() before calling RegisterScriptDescriptors().\r\nParameter name: scriptControl\r\n at System.Web.UI.ScriptControlManager.RegisterScriptDescriptors(IScriptControl scriptControl)\r\n at System.Web.UI.ScriptManager.RegisterScriptDescriptors(IScriptControl scriptControl)\r\n at Telerik.Web.UI.ProxyScriptControl.Render(HtmlTextWriter writer)\r\n at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)\r\n at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)\r\n at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)\r\n at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)\r\n at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)\r\n at System.Web.UI.Control.Render(HtmlTextWriter writer)\r\n at System.Web.UI.Control.RenderControlInt

    ernal(HtmlTextWriter writer, ControlAdapter adapter)\r\n at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)\r\n at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)\r\n at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)\r\n at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)\r\n at System.Web.UI.UpdatePanel.RenderChildren(HtmlTextWriter writer)\r\n at System.Web.UI.Control.Render(HtmlTextWriter writer)\r\n at System.Web.UI.UpdatePanel.Render(HtmlTextWriter writer)\r\n at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)\r\n at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)\r\n at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)\r\n at Telerik.Web.UI.PreControlToAjaxify.Render(HtmlTextWriter writer)\r\n at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)\r\n at Sy

    stem.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)\r\n at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)\r\n at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)\r\n at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)\r\n at System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer)\r\n at System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer)\r\n at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)\r\n at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)\r\n at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)\r\n at Telerik.Web.UI.ControlRenderer.Render(HtmlTextWriter writer)\r\n at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)\r\n at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)\r\n at System.Web.UI.Con

    trol.RenderControl(HtmlTextWriter writer)\r\n at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)\r\n at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)\r\n at System.Web.UI.Control.Render(HtmlTextWriter writer)\r\n at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)\r\n at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)\r\n at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)\r\n at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)\r\n at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)\r\n at System.Web.UI.UpdatePanel.RenderChildren(HtmlTextWriter writer)\r\n at System.Web.UI.Control.Render(HtmlTextWriter writer)\r\n at System.Web.UI.UpdatePanel.Render(HtmlTextWriter writer)\r\n at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)\r\n at System.Web.UI.Cont

    rol.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)\r\n at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)\r\n at System.Web.UI.PageRequestManager.RenderFormCallback(HtmlTextWriter writer, Control containerControl)\r\n at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)\r\n at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)\r\n at System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer)\r\n at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer)\r\n at System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output)\r\n at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)\r\n at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)\r\n at System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer)\r\n at System.Web.UI.HtmlFormWrapper.System.Web.UI.IHtmlForm.RenderControl(HtmlTextWriter wri

    ter)\r\n at System.Web.UI.PageRequestManager.RenderPageCallback(HtmlTextWriter writer, Control pageControl)\r\n at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)\r\n at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)\r\n at System.Web.UI.Page.Render(HtmlTextWriter writer)\r\n at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)\r\n at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)\r\n at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)\r\n at Telerik.Web.UI.RadAjaxControl.RenderPageInAjaxMode(HtmlTextWriter writer, Control page)\r\n at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)\r\n at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)\r\n at System.Web.UI.Page.Render(HtmlTextWriter writer)\r\n at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)\r\n

    at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)\r\n at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)\r\n at Telerik.Web.UI.RadAjaxControl.RenderPageInAjaxMode(HtmlTextWriter writer, Control page)\r\n at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)\r\n at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)\r\n at System.Web.UI.Page.Render(HtmlTextWriter writer)\r\n at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)\r\n at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)\r\n at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)\r\n at Telerik.Web.UI.RadAjaxControl.RenderPageInAjaxMode(HtmlTextWriter writer, Control page)\r\n at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)\r\n at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)\r\n at System.Web.UI.

    Page.Render(HtmlTextWriter writer)\r\n at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)\r\n at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)\r\n at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)\r\n at Telerik.Web.UI.RadAjaxControl.RenderPageInAjaxMode(HtmlTextWriter writer, Control page)\r\n at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)\r\n at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)\r\n at System.Web.UI.Page.Render(HtmlTextWriter writer)\r\n at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)\r\n at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)\r\n at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)\r\n at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)"

    (note: this is the expanded version of the error by handling the ScriptManager1_AsyncPostBackError event).

    Any help you can provide would be appreciated.  Thanks.

    -Keith

  12. Rosen
    Admin
    Rosen avatar
    3234 posts

    Posted 13 Jan 2009 Link to this post

    Hello Richardsonke,

    As I stated in my previous message, this behavior is caused by the fact that when controls are moved, the internal registration list  inside ScriptManager  is not refreshed. Therefore in order to workaround this, you should use RadAjaxManager instead of RadAjaxPanel as shown in the previously sent example.

    Sincerely yours,
    Rosen
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  13. Azadeh
    Azadeh avatar
    11 posts
    Member since:
    Mar 2012

    Posted 25 Apr 2013 Link to this post

    Hi All.
    i had same problem. i checked my source and i found  RadAjaxManager.GetCurrent(Page).AjaxSettings.AddAjaxSetting(,,,);
    was in Page load event after i put it in PreRender its solved.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017