System.Web.UI.WebControls.Adapters.DataBoundControlAdapter Class

Customizes the behavior of a System.Web.UI.WebControls.DataBoundControl object with which the adapter is associated for specific browser requests.

See Also: DataBoundControlAdapter Members

Syntax

public class DataBoundControlAdapter : WebControlAdapter

Remarks

A control derived from the System.Web.UI.WebControls.DataBoundControl class is bound to a data source and generates its user interface or child control hierarchy by enumerating the items in the data source to which it is bound. System.Web.UI.WebControls.DataBoundControl is an abstract base class that defines the common characteristics of all controls that can be bound to a data source, such as the System.Web.UI.WebControls.DataGrid and System.Web.UI.WebControls.ListBox controls. For more information, see System.Web.UI.WebControls.DataBoundControl.

A System.Web.UI.WebControls.Adapters.DataBoundControlAdapter modifies the behavior of a System.Web.UI.WebControls.DataBoundControl for a specific browser or class of browsers, or acts as a filter on some capability. Much of the adaptability in rendering behavior can be encapsulated in the specialized classes that derive from the System.Web.UI.HtmlTextWriter class. Therefore, it is likely that a single adapter can be used for a number of browser class behaviors or that inclusion of the adaptability in the System.Web.UI.HtmlTextWriter classes can make the use of a control adapter unnecessary.

Each control has explicit mappings to adapters through the .browser definition files, if there are <controlAdapter> entries in these files. Thus, any access to the System.Web.UI.Control.Adapter property of the System.Web.UI.WebControls.DataBoundControl uses the System.Web.HttpBrowserCapabilities object extracted from the .browser definition files to perform the lookup for the mapping of the adapter to control.

During processing, the .NET Framework intercepts calls to the methods of a control that could be browser specific. If a control adapter is attached, the .NET Framework calls the associated adapter methods. For more information, see System.Web.UI.Adapters.ControlAdapter.

The M:System.Web.UI.WebControls.Adapters.DataBoundControlAdapter.PerformDataBinding(System.Collections.IEnumerable) method binds an enumerable collection to the associated System.Web.UI.WebControls.DataBoundControl. The DataBoundControlAdapter.Control property returns a strongly typed reference to the System.Web.UI.WebControls.DataBoundControl.

Requirements

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