Export (0) Print
Expand All
Expand Minimize

WebPart.OnDataBinding method

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

Namespace:  Microsoft.SharePoint.WebPartPages
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

protected override void OnDataBinding(
	EventArgs e


Type: System.EventArgs

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

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 constructor of the Web Part. For example:

this.DataBinding += new EventHandler (MyDataBindingHandler);

© 2014 Microsoft