WebPartEventHandler WebPartEventHandler WebPartEventHandler WebPartEventHandler Delegate

Definition

Represents the method that will handle the WebPartAdded event, WebPartDeleted event, WebPartClosed event, WebPartMoved event, or SelectedWebPartChanged event of a WebPartManager object.

public delegate void WebPartEventHandler(System::Object ^ sender, WebPartEventArgs ^ e);
public delegate void WebPartEventHandler(object sender, WebPartEventArgs e);
type WebPartEventHandler = delegate of obj * WebPartEventArgs -> unit
Public Delegate Sub WebPartEventHandler(sender As Object, e As WebPartEventArgs)

Parameters

sender
Object Object Object Object

The source of the event.

Inheritance
WebPartEventHandlerWebPartEventHandlerWebPartEventHandlerWebPartEventHandler

Remarks

The method specified in the WebPartEventHandler delegate will be called when a WebPartAdded event, WebPartDeleted event, WebPartClosed event, WebPartMoved event, or SelectedWebPartChanged event is raised.

Page developers can provide custom handlers for Web Parts events by adding an OnWebPartAdded attribute, OnWebPartDeleted attribute, OnWebPartClosed attribute, OnWebPartMoved attribute, or OnSelectedWebPartChanged attribute to the <asp:webpartmanager> element in a page, and assigning a custom method name to the attribute. A custom handler can also be assigned programmatically. For more information about how to subscribe to an event, see How to: Raise and Consume Events.

Extension Methods

GetMethodInfo(Delegate) GetMethodInfo(Delegate) GetMethodInfo(Delegate) GetMethodInfo(Delegate)

Gets an object that represents the method represented by the specified delegate.

Applies to