AjaxManager - User Controls - Master pages

First NameLast NameTitleBirth DateCityCountry
 Page 1 of 2, items 1 to 5 of 9.
NancyDavolioSales Representative12/08/1948SeattleUSA
AndrewFullerVice President, Sales02/19/1952TacomaUSA
JanetLeverlingSales Representative08/30/1963KirklandUSA
MargaretPeacockSales Representative09/19/1937RedmondUSA
StevenBuchananSales Manager03/04/1955LondonUK
  • Sales
  • Contact Information
 CustomerOrderIDOrder dateOrder Total
  Orders count: 123Last order dates: 5/6/1998 
Page size:
 123 items in 18 pages
Ernst Handel1025807/17/1996$403.72
Wartian Herkku1027008/01/1996$1,376.00
Magazzini Alimentari Riuniti1027508/07/1996$15.36
Tradição Hipermercados1029208/28/1996$1,296.00
Tortuga Restaurante1029308/29/1996$848.70
Tortuga Restaurante1030409/12/1996$954.40
Customer Image
Address:507 - 20th Ave. E. Apt. 2A
HomePhone:(206) 555-9857
Isolate this demo as a stand-alone application
  • About this demo
  • C#
  • VB

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" );
  • DefaultCS.aspx
  • WebUserControlCS.ascx
  • DefaultCS.aspx.cs
    • DefaultCS.aspx.cs
    • WebUserControlCS.ascx.cs
  • styles.css
<%@ Page Language="c#" CodeFile="DefaultCS.aspx.cs" Inherits="Telerik.AjaxManager.ApplicationScenarios.UserControl.DefaultCS" %>

<%@ Register Src="WebUserControlCS.ascx" TagName="WebUserControl" TagPrefix="uc1" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
    <link href="styles.css" rel="Stylesheet" type="text/css" />
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
    <div class="demo-container">
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <uc1:WebUserControl ID="WebUserControl1" runat="server"></uc1:WebUserControl>

Support & Learning Resources

Find Assistance

Help Us Improve

Was this example helpful?