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

Sys.InvalidOperationException after F5 refresh

2 Answers 95 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Federico
Top achievements
Rank 1
Federico asked on 25 Nov 2011, 10:46 AM
Hi
I've found a problem while using RadAjaxManager, a RadButton registered in its ajax setting to update an always visible asp.net  panel containing an asp.net placeholder aimed to dinamically load an.ascx control (pnlItemDetails):

This is in a Content page:

<telerik:AjaxSetting AjaxControlID="BtnSelectItem">
    <UpdatedControls>
        <telerik:AjaxUpdatedControl ControlID="pnlProjectDetails" />
        <telerik:AjaxUpdatedControl ControlID="PnlLocalMenu" />
        <telerik:AjaxUpdatedControl ControlID="pnlItemDetails" />
        <telerik:AjaxUpdatedControl ControlID="navBarFader" />
    </UpdatedControls>
</telerik:AjaxSetting>

the panel with the place holder

<asp:Panel ID="pnlSelectedItem" runat="server">
    <asp:Panel ID="pnlItemDetails" CssClass="ProjectDetails" runat="server">
        <asp:PlaceHolder ID="phItemDetails" runat="server"></asp:PlaceHolder>
    </asp:Panel>
</asp:Panel>

All things works as expected until a browser refresh is invoked (by F5 or the 'File Download warning' bar of Internet Explorer).
After the page refresh, if the button is clicked, all server events are executed  but at the client side, after the rendering phase, the following javascript error is triggered:

Sys.InvalidOperationException: Sys.InvalidOperationException: Could not find UpdatePanel with ID 'ctl00_ctl00_MainContent_pnlItemDetailsPanel'. If it is being updated dynamically then it must be inside another UpdatePanel.

 Now, I know that this problem is often related to the update of conditionally visible controls, but I have a container asp.net Panel that is always visible and this behaviour is only present after F5 refresh triggering.

It'seems that the F5 refresh fail somehow to get the full DOM and update panels to refresh

Please, I need some help in finding the source of this issue.

Thank You in advance,
Federico

2 Answers, 1 is accepted

Sort by
0
Tsvetina
Telerik team
answered on 29 Nov 2011, 09:10 AM
Hello Federico,

It seems that you have also opened a support ticket on this issue and we just answered it. Please, check it out and if you have any thoughts or concerns, please post them there, so we avoid duplicate posts. 

If anyone else is interested, here is what we suggested in the support thread:

It is hard to identify the cause of the issue without being able to replicate it, especially when it has not been reported to us by other customers. However, here are a few things that you can take a look at more specifically when trying to identify the cause of the issue:
1) Check the request sent to the server when pressing F5 in Firebug's Console or in IE Developer Toolbar and then what is the response returned. Is the panel in question part of the response? Does it have the exact same ID?
2) Do you have "nested" AJAX settings? By that I mean settings that would create update panels? If so, try clearing them up as they are in most cases not needed, plus they are harder to debug in case of erroneous behavior.
For example, if the container of a dynamically loaded user control is set to update itself with AJAX, there is no need of any AJAX settings inside the user control, since it would anyway always do AJAX and its whole content would always be refreshed.
3) If none of the above provide you any help, my advice is to temporarily comment out parts of the AJAX settings one by one in your page to see if at some stage the button->panels setting starts working correctly after page refresh and this way you will see which part of all the AJAX settings and coding causes the problematic behavior.
 

All the best,
Tsvetina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Abdullah
Top achievements
Rank 1
answered on 01 Feb 2012, 10:25 AM
thanks, i was having same problem, the solution was i disabled the ajax manager in master page than i was able to see where the error was coming. It was a runtime exception. 
Tags
General Discussions
Asked by
Federico
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
Abdullah
Top achievements
Rank 1
Share this question
or