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 Overrides Sub OnDataBinding ( _
    e As EventArgs _
Dim e As EventArgs

protected override void OnDataBinding(
    EventArgs e


  • 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);

See also


WebPart class

WebPart members

Microsoft.SharePoint.WebPartPages namespace