System.Web.UI.HtmlControls.HtmlSelect.OnDataBinding Method

Raises the System.Web.UI.Control.DataBinding event of an System.Web.UI.HtmlControls.HtmlSelect control.

Syntax

protected override void OnDataBinding (EventArgs e)

Parameters

e
A EventArgs that contains the event data.

Remarks

The System.Web.UI.Control.DataBinding event is raised when data is bound to the System.Web.UI.HtmlControls.HtmlSelect control. This method notifies the control to perform any data-binding logic that is associated with it. Specifically, the HtmlSelect.OnDataBinding(EventArgs) method creates the HtmlSelect.Items collection from the data source specified in either the HtmlSelect.DataSource property or the HtmlSelect.DataSourceID property.

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

The HtmlSelect.OnDataBinding(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.HtmlControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0