System.Web.UI.WebControls.BaseDataBoundControl Class

Serves as the base class for controls that bind to data using an ASP.NET data source control.

See Also: BaseDataBoundControl Members


[System.ComponentModel.Designer("System.Web.UI.Design.WebControls.BaseDataBoundControlDesigner, System.Design, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.ComponentModel.Design.IDesigner")]
public abstract class BaseDataBoundControl : WebControl


ASP.NET supports a controls architecture that enables Web server controls to bind to data in a consistent fashion. Web server controls that bind to data are referred to as data-bound controls, and the classes that facilitate that binding are called data source controls. Data-bound controls that are designed to use ASP.NET data source controls derive from the System.Web.UI.WebControls.BaseDataBoundControl control class, which defines the base data-bound control functionality.

You can use the data-bound controls that are provided with ASP.NET, including System.Web.UI.WebControls.GridView, System.Web.UI.WebControls.DetailsView, and System.Web.UI.WebControls.TreeView, to perform most Web development tasks that involve displaying data. In scenarios in which these controls do not provide the functionality you need, you can inherit from the base System.Web.UI.WebControls.DataBoundControl and System.Web.UI.WebControls.HierarchicalDataBoundControl classes to implement your own custom data source control.

While any class that supports the DataSource and DataSourceID properties and the DataBind method is a data-bound control, most ASP.NET data-bound controls extend the abstract System.Web.UI.WebControls.BaseDataBoundControl and System.Web.UI.WebControls.DataBoundControl classes. Notable exceptions include System.Web.UI.WebControls.DataGrid, System.Web.UI.WebControls.Repeater, and the System.Web.UI.WebControls.DropDownList controls. For more information about data binding, see Accessing Data with ASP.NET.


Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions:
Since: .NET 2.0