The example demonstrates how to use the RadAjaxManager control in a page->user control scenario. You can use the same approach in a master->content page scenario.
The standard controls from this demo (RadTabStrip, RadMultiPage, DetailsView, RadGrids and controls inside them) reside within a WebUserControl and the manager is placed in the main page (Telerik support always recommends that). You can apply exactly the same technique when the updated controls are hosted in a content page and the RadAjaxManager is added on the relevant master page.
<
telerik:RadAjaxManagerProxy
ID
=
"AjaxManagerProxy1"
runat
=
"server"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"EmployeesGrid"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"RadTabStrip1"
/>
<
telerik:AjaxUpdatedControl
ControlID
=
"RadMultiPage1"
LoadingPanelID
=
"RadAjaxLoadingPanel1"
/>
<
telerik:AjaxUpdatedControl
ControlID
=
"EmployeesGrid"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
<
telerik:AjaxSetting
AjaxControlID
=
"OrdersGrid"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"OrdersGrid"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManagerProxy
>
Should you need the server or client-side RadAjaxManager functionality (like ResponseScripts collection, ajaxRequest function) you can get the "master" manager instance via Server-Side GetCurrent method from the user control code-behind:
RadAjaxManager.GetCurrent(
this
).Alert(
"1"
);
Use server-side code block in a JS function inside your WebUserControl to call the master manager ajaxRequest function:
<telerik:RadCodeBlock ID=
"RadCodeBlock1"
runat=
"server"
>
<script type=
"text/javascript"
>
function
myUserControlClickHandler()
{
$find(
"<%= RadAjaxManager.GetCurrent(this).ClientID %>"
).ajaxRequest(
"content"
);
}
</script>
</telerik:RadCodeBlock>