System.Web.UI.WebControls.DataBoundControl.PerformDataBinding Method

When overridden in a derived class, binds data from the data source to the control.

Syntax

protected virtual void PerformDataBinding (IEnumerable data)

Parameters

data
The IEnumerable list of data returned from a DataBoundControl.PerformSelect method call.

Remarks

Implement this method instead of the BaseDataBoundControl.DataBind method when you derive a data-bound control from the System.Web.UI.WebControls.DataBoundControl class. Placing your control's data-binding logic in DataBoundControl.PerformDataBinding(IEnumerable) enables you to avoid the System.Web.UI.Control.DataBinding and BaseDataBoundControl.DataBound events being raised in the wrong order.

While the base System.Web.UI.WebControls.DataBoundControl class provides no specific implementation for this method, the DataBoundControl.PerformDataBinding(IEnumerable) method is called by the DataBoundControl.PerformSelect method to bind the values of any user interface (UI) controls to the data that is retrieved by the DataBoundControl.PerformSelect method.

Requirements

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