New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

User Controls - Master pages

First NameLast NameTitleBirth DateCityCountry
12
 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: 117Last order dates: 5/5/1998 
Page size:
 117 items in 17 pages
Tradição Hipermercados1029208/28/1996$1,296.00
Tortuga Restaurante1029308/29/1996$848.70
Tortuga Restaurante1030409/12/1996$954.40
Romero y tomillo1030609/16/1996$498.50
Du monde entier1031109/20/1996$268.80
Rattlesnake Canyon Grocery1031409/25/1996$232.70
Rattlesnake Canyon Grocery1031609/27/1996$2,835.00
Customer Image
BirthDate:12/08/1948
Country:USA
City:Seattle
Address:507 - 20th Ave. E. Apt. 2A
HomePhone:(206) 555-9857

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>
  • DefaultVB.aspx
  • WebUserControlVB.ascx
  • DefaultVB.aspx.vb
    • DefaultVB.aspx.vb
    • WebUserControlVB.ascx.vb
  • styles.css
<%@ Page Language="vb" CodeFile="DefaultVB.aspx.vb" Inherits="Telerik.AjaxManager.ApplicationScenarios.UserControl.DefaultVB" %>

<%@ Register Src="WebUserControlVB.ascx" TagName="WebUserControl" TagPrefix="uc1" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html>
<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" />
</head>
<body>
    <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">
        </telerik:RadAjaxManager>
        <uc1:WebUserControl ID="WebUserControl1" runat="server"></uc1:WebUserControl>
    </div>
    </form>
</body>
</html>

Support & Learning Resources

Find Assistance