Sys.InvalidOperationException: Could not find UpdatePanel with ID '...'

5 posts, 0 answers
  1. Andrew Lawrence
    Andrew Lawrence avatar
    32 posts
    Member since:
    Mar 2007

    Posted 08 Mar 2009 Link to this post

    Hi,
    I have just upgraded an app from RadAjax Classic to the latest version for ASP .NET AJAX. I have been through the process of switching to the RadAjaxManagerProxy, adding ajax settings programatically in Page_Load instead of Page_Init etc.

    Now most of my ajax updates are now working but some are not.

    After certain updates the page fails to update and I get the following javascript error:

    Error: [Exception... "'Sys.InvalidOperationException: Sys.InvalidOperationException: Could not find UpdatePanel with ID 'someAjaxifiedControlPanel'. If it is being updated dynamically then it must be inside another UpdatePanel.' when calling method: [nsIDOMEventListener::handleEvent]"  nsresult: "0x8057001c (NS_ERROR_XPC_JS_THREW_JS_OBJECT)"  location: "<unknown>"  data: no]

    The particular control that this error message is complaining about is not part of the current update and is not currently visible. With RadAjax Classic this didn't matter, so I don't think this is the issue.



    What causes this error?
  2. Iana Tsolova
    Admin
    Iana Tsolova avatar
    3388 posts

    Posted 09 Mar 2009 Link to this post

    Hello Andrew,

    It is good that you moved the dynamic ajax settings creation on Page_Load as suggested here. However I have to mention that with the "new" RadAjax, it is preferable to add only always visible controls to the ajax setting pairs. Therefore I suggest that you wrap the someAjaxifiedControl control into a ASP:Panel control and add the outer panel to the ajax settings instead.

    Please check it out and let me know if this helps.

    Best wishes,
    Iana
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Andrew Lawrence
    Andrew Lawrence avatar
    32 posts
    Member since:
    Mar 2007

    Posted 09 Mar 2009 Link to this post

    So the following scenario is no longer possible?

    <asp:Panel runat="server" ID="pnlFirst" Visible="false">   
        <asp:TextBox runat="server" ID="txtFirst" />   
        <asp:Button runat="server" ID="btnFirst" />   
    </asp:Panel>   
       
    <asp:Panel runat="server" ID="pnlSecond">   
        <asp:TextBox runat="server" ID="txtSecond" />   
        <asp:Button runat="server" ID="btnSecond" />   
    </asp:Panel>   
       
    <telerik:RadAjaxManager runat="server" ID="ram">   
        <AjaxSettings>   
            <telerik:AjaxSetting AjaxControlID="btnFirst">   
                <UpdatedControls>   
                    <telerik:AjaxUpdatedControl ControlID="txtFirst" />   
                </UpdatedControls>   
            </telerik:AjaxSetting>   
        </AjaxSettings>   
        <AjaxSettings>   
            <telerik:AjaxSetting AjaxControlID="btnSecond">   
                <UpdatedControls>   
                    <telerik:AjaxUpdatedControl ControlID="txtSecond" />   
                </UpdatedControls>   
            </telerik:AjaxSetting>   
        </AjaxSettings>   
    </telerik:RadAjaxManager>   


    With RadAjax Classic this setup was very easy to manage. If the first panel becomes invisible it should not affect updates in the second panel because the two panels are not involved in the same update.

    In a complex scenario isn't it much harder to manage if I have to worry about whether a control is visible or not every time I Ajaxify it?
    Wouldn't it be worse for performance to have to wrap large sections of the page in ajaxified panels, in case some of the controls are inivisble?
  5. Iana Tsolova
    Admin
    Iana Tsolova avatar
    3388 posts

    Posted 11 Mar 2009 Link to this post

    Hello Andrew,

    In fact in the preceding setup, the fact that the fist Panel is invisible, does not directly affect the second Panel. Here the fact that invisible content if ajaxified is the spoiler.
    However I can agree your arguments are reasonable, note that RadAjax for ASP.NET AJAX is built on top of MS AJAX Framework which is a different technology from this lying under RadAjax for ASP.NET. That is why there might be slight difference in the both RadAjax controls behavior. 

    Sincerely yours,
    Iana
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  6. khalid
    khalid avatar
    2 posts
    Member since:
    Sep 2015

    Posted 17 Sep 2015 Link to this post

    I Solve This Problem By Closing an un closed HTML < DIV > inside the ASPX page!!!
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017