Condividi tramite


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)
Available in Sandboxed Solutions: No

Syntax

'Declaration
Protected Overrides Sub OnDataBinding ( _
    e As EventArgs _
)
'Usage
Dim e As EventArgs

Me.OnDataBinding(e)
protected override void OnDataBinding(
    EventArgs e
)

Parameters

  • e
    Type: System.EventArgs

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

this.DataBinding += new EventHandler (MyDataBindingHandler);

See Also

Reference

WebPart Class

WebPart Members

Microsoft.SharePoint.WebPartPages Namespace