BaseDataBoundControl Class

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

Namespace:  System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)

[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public abstract class BaseDataBoundControl : WebControl
<asp:BaseDataBoundControl />

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 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 GridView, DetailsView, and 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 DataBoundControl and 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 BaseDataBoundControl and DataBoundControl classes. Notable exceptions include DataGrid, Repeater, and the DropDownList controls. For more information about data binding, see Accessing Data with ASP.NET.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2015 Microsoft