WebPartManager.OnWebPartAdded(WebPartEventArgs) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
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.