+1-888-365-2779
Try Now
More in this section

Forums / 3.x Pre-release forums (retired) / MS AJAX Compatibility

MS AJAX Compatibility

18 posts, 0 answered
  1. Jason Grovert
    Jason Grovert avatar
    28 posts
    Registered:
    25 Oct 2005
    19 Apr 2007
    Link to this post
    We have designed several User Controls (.ascx) using the new AJAX Extentions for ASP.Net from Microsoft and have encountered a problem when editing a page.  If there's a control on the Page that contains an UpdatePanel and you drop any other control on the page you get an Exception.  The ScriptManager control is on the MasterPage for the Template we are using for this page.  You can easily reproduce this my creating a User Control and dropping an UpdatePanel control on it.  Then add the control to a page.  Next add any additional control to the page and you'll get the error.  This is a serious problem because it prevents us from adding User Controls that contain UpdatePanels to a page, or at best it must be added last.

  2. Bogdana Ivanova
    Bogdana Ivanova avatar
    66 posts
    Registered:
    24 Sep 2012
    20 Apr 2007
    Link to this post
    Hi Jason,

    Thank you very much for turning our attention to this issue. We agree that support for MS Ajax is important issue and we will fix it for the official release of Sitefinity 3.0.

    Kind regards,
    Bogdana Ivanova
    the telerik team

    Instantly find answers to your questions at the new telerik Support Center
  3. Vassil Daskalov
    Vassil Daskalov avatar
    261 posts
    Registered:
    18 May 2013
    09 May 2007
    Link to this post
    Hi Jason Grovert,

    I was able to test the scenario you are describing with AJAX Extentions for ASP.Net but was not able to reproduce any exceptions. I did the following:

    1. Created User Control with UpdatePanel on it.
    2. Added Script Manager to the master page.
    3. Updated my web.config.
    4. Added the control to the page and some other control to the page without any errors.

    Can you let me know what exception you get and if there is some inconsistency in my and your steps with using ajax user controls. Perhaps it would be much easier if you could send us some basic project which rises the problem. Thanks in advance. I am looking forward for your reply.

    All the best,
    Vassil Daskalov
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  4. Jason Grovert
    Jason Grovert avatar
    28 posts
    Registered:
    25 Oct 2005
    01 Jun 2007
    Link to this post
    What do you mean by "Updated my web.config"?  We can reproduce the error every time. (see below)

    Server Error in '/' Application.  
    --------------------------------------------------------------------------------  
     
    Cannot unregister UpdatePanel with ID 'TitleEscrowPanel' since it was not registered with the ScriptManager. This might occur if the UpdatePanel was removed from the control tree and later added again, which is not supported.  
    Parameter name: updatePanel   
    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.ArgumentException: Cannot unregister UpdatePanel with ID 'TitleEscrowPanel' since it was not registered with the ScriptManager. This might occur if the UpdatePanel was removed from the control tree and later added again, which is not supported.  
    Parameter name: updatePanel  
     
    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:   
     
     
    [ArgumentException: Cannot unregister UpdatePanel with ID 'TitleEscrowPanel' since it was not registered with the ScriptManager. This might occur if the UpdatePanel was removed from the control tree and later added again, which is not supported.  
    Parameter name: updatePanel]  
       System.Web.UI.PageRequestManager.UnregisterUpdatePanel(UpdatePanel updatePanel) +216  
       System.Web.UI.ScriptManager.System.Web.UI.IScriptManagerInternal.UnregisterUpdatePanel(UpdatePanel updatePanel) +67  
       System.Web.UI.UpdatePanel.OnUnload(EventArgs e) +71  
       System.Web.UI.Control.UnloadRecursive(Boolean dispose) +267  
       System.Web.UI.Control.UnloadRecursive(Boolean dispose) +204  
       System.Web.UI.Control.RemovedControl(Control control) +89  
       System.Web.UI.ControlCollection.RemoveAt(Int32 index) +96  
       System.Web.UI.ControlCollection.Remove(Control value) +22  
       Telerik.Cms.Web.UI.ControlDesigner.RenderControl() +438  
       Telerik.Cms.Web.UI.ControlDesigner.CreateChildControls() +950  
       System.Web.UI.Control.EnsureChildControls() +87  
       System.Web.UI.Control.PreRenderRecursiveInternal() +41  
       System.Web.UI.Control.PreRenderRecursiveInternal() +161  
       System.Web.UI.Control.PreRenderRecursiveInternal() +161  
       System.Web.UI.Control.PreRenderRecursiveInternal() +161  
       System.Web.UI.Control.PreRenderRecursiveInternal() +161  
       System.Web.UI.Control.PreRenderRecursiveInternal() +161  
       System.Web.UI.Control.PreRenderRecursiveInternal() +161  
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360  
     
       
     
     
    --------------------------------------------------------------------------------  
    Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210  
  5. Vassil Daskalov
    Vassil Daskalov avatar
    261 posts
    Registered:
    18 May 2013
    04 Jun 2007
    Link to this post
    Hello Jason,

    I was able to reproduce your error this time. Sorry for misleading you. Perhaps I tested with an older version. Anyway the problem is already localized and we will give it a closer look. Unfortunately, we cannot give you a quick workaround for it but you could add your control last to the page when you are sure you have finished with the page layout.

    Once again I am sorry and thanks for the valuable feedback. Your Telerik points have been updated.

    Best wishes,
    Vassil Daskalov
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  6. Leonard Simmons
    Leonard Simmons avatar
    1 posts
    Registered:
    16 Jan 2007
    29 Oct 2007
    Link to this post
    Has there been any resolution to this? We have the same problem and it makes sitefinity unusable.

    ta

    Len
  7. Pepi
    Pepi avatar
    981 posts
    Registered:
    16 Sep 2016
    30 Oct 2007
    Link to this post
    Hi Leonard,

    The fix of this issue will be included in the upcoming Service Pack that is coming out at the end of the month. Please contact us if the problem persists after upgrading your project to SP.

    Kind regards,
    Pepi
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  8. Skywalker
    Skywalker avatar
    8 posts
    Registered:
    22 Sep 2007
    07 Dec 2007
    Link to this post
    I applied the SP2 patch, but I still get an exception when I have an UpdatePanel in a MasterPage and try to edit the masterpage, or a page using the masterpage.

    To reproduce the problem, do the following:

    1. Create a masterpage with both a ScriptManager and an UpdatePanel, and upload it in SiteFinity to generate a Template.
    2. Try to edit the template. You will get an exception, stating that you "Cannot unregister UpdatePanel with ID 'myUpdatePanel' since it was not registered with the ScriptManager. This might occur if the UpdatePanel was removed from the control tree and later added again, which is not supported.
    Parameternaam: updatePanel
    "

    I will try using the RadAjax control and see what happens.

    Best regards,
    Sipke
  9. Skywalker
    Skywalker avatar
    8 posts
    Registered:
    22 Sep 2007
    07 Dec 2007
    Link to this post
    Using RadAjax solved my problem in this case...
  10. S. Webb
    S. Webb avatar
    36 posts
    Registered:
    28 Dec 2006
    04 Feb 2008
    Link to this post
    Is there a resolution to using the UpdatePanel? Is this still being addressed?
  11. Pepi
    Pepi avatar
    981 posts
    Registered:
    16 Sep 2016
    05 Feb 2008
    Link to this post
    Hello Sipke and Steve,

    Thanks a lot for pointing out this issue. It seems that the problem has been fixed for User Controls only, i.e. when you use UpdatePanels in a User Control. For the time being, the workaround is to avoid using UpdatePanels in the master pages.
    You could separate the functionality that should be updated without refreshing the whole page in a User Control and wrap the specific regions inside UpdatePanels.

    Your Telerik accounts have been updated for noticing this.

    Kind regards,
    Pepi
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  12. Chris
    Chris avatar
    9 posts
    Registered:
    17 Aug 2007
    26 Aug 2008
    Link to this post
    Hi Sipke, I was wondering if you could help? 

    I have been having similar issues with getting update panels to work in Sitefinity.
    You mentioned that:

    "Using RadAjax solved my problem in this case..."

    Can I ask how you achieved this?  I tried switching to the RadAjax and got same issues.

    e.g. when dragging a generic content control into a page I get...

    Cannot unregister UpdatePanel with ID 'des4$ctl06$RadAjaxPanel1Panel' since it was not registered with the ScriptManager. This might occur if the UpdatePanel was removed from the control tree and later added again, which is not supported.Parameter name: updatePanel

    Thanks for any advice you can give

    Chris
  13. Chris
    Chris avatar
    9 posts
    Registered:
    17 Aug 2007
    27 Aug 2008
    Link to this post

    Hi Everyone,
    After some experimentation I have come up with an alternative solution to using Ajax Update panels in Sitefinity. It might not be ideal for everyone but I thought it might be worth sharing.

    First I created my UserControl with Ajax Update Panel functionality in the standard way.

    Then I created a second UserControl to upload to Sitefinity. This control has nothing but a single PlaceHolder control in the ascx. In the code behind I added the following...

    string pageMode = base.Request.QueryString["cmspagemode"];

    if (!string.IsNullOrEmpty(pageMode) && (pageMode == "edit" || pageMode == "preview"))
    {
    // we are in Sitefinity's backend
    // you could load in a message or dummy control

    }
    else
    {

    Control QuickSearchUserControl = LoadControl("~/UserControls/Custom/QuickSearchFrontend.ascx");
    ControlPlaceHolder.Controls.Add(QuickSearchUserControl);
    }

    Basically it detects if you are in the Sitefinity backend using the QueryString "cmspagemode". If we are in the backend don't load the control with the Ajax Update Panel (as it causes issues when editing in sitefinity). If we aren’t load the control as normal.

    This could easily be extended into a control with a property for the path to the UserControl to load in and maybe a second property for a message to show in when in the backend of Sitefinity. That way it could be reused across a Sitefinity Site and the path / message properties could be set in the Sitefinity UI.

    Hope this is of some use to you

    Thanks

    Chris


  14. Georgi
    Georgi avatar
    3583 posts
    Registered:
    20 Sep 2016
    27 Aug 2008
    Link to this post
    Hello Chris,

    I think this will be definitely helpful for someone - we will redirect him to this solution. Thank you for sharing it with the community. We have updated your Telerik account for that.

    Regards,
    Georgi
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  15. nogatek
    nogatek avatar
    35 posts
    Registered:
    23 Apr 2008
    01 Nov 2008
    Link to this post
    It certainly helped me!

    Thanks Chris

    Mark
  16. ahmet zorlu
    ahmet zorlu avatar
    1 posts
    Registered:
    04 Mar 2010
    04 Mar 2010
    Link to this post
  17. SilverlightShow
    SilverlightShow avatar
    1 posts
    Registered:
    06 Aug 2008
    23 Mar 2010
    Link to this post
    Hi,

    It seems that this issue has still not been fixed in Sitefinity 3.7. I have a user control with an UpdatePanel in it and it throws an exception in edit mode.

    Cannot unregister UpdatePanel with ID 'UpdatePanel' since it was not registered with the ScriptManager. This might occur if the UpdatePanel was removed from the control tree and later added again, which is not supported.
    Parameter name: updatePanel


    Can you suggest an alternative to using UpdatePanel?

    Nikolay Raychev
    CompletIT
  18. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    19 Sep 2016
    23 Mar 2010
    Link to this post
    Hi SilverlightShow,

    You can take a look at Cannot unregister UpdatePanel with ID KB article. You could use RadAjaxPanel control and get the number of controls inside this panel. Then you have to clear the controls form the holder add the RadAjaxPanel again.

    RadAjaxPanel _radAjaxPanel = new RadAjaxPanel();
    radAjaxPanel .Width = Unit.Percentage(100);
    Control c = PlaceHolder.Controls[0];
    while (c != null)
    {  
        radAjaxPanel .Controls.Add(c);
        if (PlaceHolder.Controls.Count == 0)
            break;
        c = PlaceHolder.Controls[0];
    }
    PlaceHolder.Controls.Clear();
    PlaceHolder.Controls.Add(_radAjaxPanel );


    Kind regards,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Register for webinar
18 posts, 0 answered