Share via


SPWebPartManager.OnWebPartAdding Method

Handles the WebPartAdding event.

Namespace:  Microsoft.SharePoint.WebPartPages
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
Available in SharePoint Online

Syntax

'Declaration
Protected Overrides Sub OnWebPartAdding ( _
    eventArgs As WebPartAddingEventArgs _
)
'Usage
Dim eventArgs As WebPartAddingEventArgs

Me.OnWebPartAdding(eventArgs)
protected override void OnWebPartAdding(
    WebPartAddingEventArgs eventArgs
)

Parameters

Remarks

This override is called when the process of adding a control to a zone has begun. If the adding process is successful, this event is followed by the WebPartAdded event.

See Also

Reference

SPWebPartManager Class

SPWebPartManager Members

Microsoft.SharePoint.WebPartPages Namespace