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

Two RadAjaxManager on 1 page.

1 Answer 307 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Mugdha Aditya
Top achievements
Rank 1
Mugdha Aditya asked on 24 Mar 2012, 07:02 AM
Hello,

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?

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 26 Mar 2012, 08:25 AM
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.
aspx:
<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
  <AjaxSettings>
      <telerik:AjaxSetting AjaxControlID="LoadingPanel1">
          <UpdatedControls>
             <telerik:AjaxUpdatedControl ControlID="LoadingPanel1" />
          </UpdatedControls>
      </telerik:AjaxSetting>
  </AjaxSettings>
</telerik:RadAjaxManagerProxy>
For more information, you can check the following help documentation.
RadAjaxManagerProxy.

Thanks,
Shinu.
Tags
Ajax
Asked by
Mugdha Aditya
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or