Partager via


OnDataBinding(System.EventArgs) Method

The OnDataBinding method of the WebPart class is the event handler for the System.Web.UI.Control.DataBinding event that occurs when a Web Part is binding to a data source.

Parameters

e   A System.EventArgs that contains the data for the System.Web.UI.Control.DataBinding event.

Remarks

If your Web Part needs to perform any data binding logic that is associated with System.Web.UI.Control.DataBinding event, you can subscribe to the event by creating an appropriate event handler in the Web Part's constructor. For example:

this.DataBinding += new EventHandler (MyDataBindingHandler);

Requirements

Platforms: Windows Server 2003

Security: Code Access Security