WebPartManager.OnWebPartAdded(WebPartEventArgs) 方法

定义

引发 WebPartAdded 事件,该事件在 WebPart 控件已被添加到某个页之后发生。

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)

参数

e
WebPartEventArgs

包含事件数据的 WebPartEventArgs

注解

OnWebPartAdded 添加 WebPart 控件 (或其他添加到 WebPartZoneBase 区域) 页的服务器控件的过程中调用 方法。

页面开发人员可以通过将 属性添加到 OnWebPartAdded<asp:webpartmanager> 元素并将自定义方法名称分配给 属性,为 WebPartAdded 事件创建自定义处理程序。

适用于

另请参阅