Bewerken

Share via


WebPartManager.OnWebPartAdded(WebPartEventArgs) Method

Definition

Raises the WebPartAdded event, which occurs after a WebPart control has been added to a page.

protected:
 virtual void OnWebPartAdded(System::Web::UI::WebControls::WebParts::WebPartEventArgs ^ e);
protected virtual void OnWebPartAdded (System.Web.UI.WebControls.WebParts.WebPartEventArgs e);
abstract member OnWebPartAdded : System.Web.UI.WebControls.WebParts.WebPartEventArgs -> unit
override this.OnWebPartAdded : System.Web.UI.WebControls.WebParts.WebPartEventArgs -> unit
Protected Overridable Sub OnWebPartAdded (e As WebPartEventArgs)

Parameters

e
WebPartEventArgs

A WebPartEventArgs that contains the event data.

Remarks

The OnWebPartAdded method is called during the process of adding a WebPart control (or other server control that is added to a WebPartZoneBase zone) to a page.

Page developers can create a custom handler for the WebPartAdded event by adding the OnWebPartAdded attribute to the <asp:webpartmanager> element, and assigning a custom method name to the attribute.

Applies to

See also