DynamicDataManager.RegisterControl Method (Control)
.NET Framework 4.5
Registers a control with the DynamicDataManager control.
Assembly: System.Web.DynamicData (in System.Web.DynamicData.dll)
Parameters
- control
- Type: System.Web.UI.Control
The data control to register.
The following example shows how to register a System.Web.UI.WebControls.GridView control in the Page_Init method of an ASP.NET Web page.
<%@ Page Language="C#" MasterPageFile="~/Site.master" %> <script runat="server"> protected void Page_Init(object sender, EventArgs e) { DynamicDataManager1.RegisterControl(GridView1); } </script> <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server"> <h1> DynamicDataManager VB Sample</h1> <asp:DynamicDataManager ID="DynamicDataManager1" runat="server" AutoLoadForeignKeys="true" /> <asp:GridView ID="GridView1" runat="server" DataSourceID="GridDataSource" AllowPaging="True" AllowSorting="True" CssClass="gridview"> </asp:GridView> <asp:LinqDataSource ID="GridDataSource" runat="server" EnableDelete="true"> </asp:LinqDataSource> </asp:Content>
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.