System.Web.UI.WebControls.BaseDataBoundControl.OnDataBound Method

Raises the BaseDataBoundControl.DataBound event.

Syntax

protected virtual void OnDataBound (EventArgs e)

Parameters

e
An EventArgs object that contains the event data.

Remarks

This method notifies a server control that any data binding logic associated with the control has completed.

Note:

The BaseDataBoundControl.DataBind method is sealed on all controls derived from System.Web.UI.WebControls.BaseDataBoundControl. Data-bound controls should override PerformDataBinding instead of the BaseDataBoundControl.DataBind method to bind data. If BaseDataBoundControl.DataBind is overridden, the System.Web.UI.Control.OnDataBinding(EventArgs) and BaseDataBoundControl.OnDataBound(EventArgs) events are raised out of order.

Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.

The BaseDataBoundControl.OnDataBound(EventArgs) method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

Requirements

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