Two RadAjaxManager on 1 page.

2 posts, 0 answers
  1. Mugdha Aditya
    Mugdha Aditya avatar
    71 posts
    Member since:
    Mar 2010

    Posted 24 Mar 2012 Link to this post


    Am havinf 2 usercontrols in my project and both are having RadAjaxManager.
    i have register both controls on singel page.



    @ Register TagPrefix="ModelData" TagName="ucSourscDoc" Src="~/PeerBenchmarking/controls/ucSourceDocument.ascx" %>




    @ Register TagPrefix="ModelData" TagName="ucUploadDoc" Src="~/PeerBenchmarking/controls/ucUploadDocument.ascx" %>


    So its giving me error as

    Only one instance of a RadAjaxManager can be added to the page!

    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.InvalidOperationException: Only one instance of a RadAjaxManager can be added to the page!

    i need RadAjaxManager on both usercontrol because i want to show loading image while datatloading.

    Any solution for this?
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 26 Mar 2012 Link to this post

    Hello Mugdha,

    RadAjax no longer allows more than one RadAjaxManager on the page. Instead, in a complex scenario like WebUserControls or Master/ContentPages, one should place RadAjaxManager instance on the main/master page and add a proxy control to the user control/content page. RadAjaxManagerProxy copies the exact same RadAjaxManager designer configuration so that one can
    set all the necessary AJAX settings within the WebUserControl/ContentPage entirely through the designer. Here is the sample code.
    <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
          <telerik:AjaxSetting AjaxControlID="LoadingPanel1">
                 <telerik:AjaxUpdatedControl ControlID="LoadingPanel1" />
    For more information, you can check the following help documentation.

Back to Top