WebPart.OnClosing(EventArgs) 方法

定义

启用派生类,以在 Web 部件页中关闭 WebPart 控件时提供自定义处理。Enables derived classes to provide custom handling when a WebPart control is closed on a Web Parts page.

protected public:
 virtual void OnClosing(EventArgs ^ e);
protected internal virtual void OnClosing (EventArgs e);
abstract member OnClosing : EventArgs -> unit
override this.OnClosing : EventArgs -> unit
Protected Friend Overridable Sub OnClosing (e As EventArgs)

参数

e
EventArgs

包含事件数据的 EventArgsAn EventArgs that contains the event data.

注解

基类中的方法 WebPart 不包含实现。The method in the WebPart base class contains no implementation. WebPart如果需要,派生控件可以重写方法以在控件关闭时提供自定义处理。Derived WebPart controls can override the method if needed to provide custom handling when the control is closed. WebPartManager OnClosing 如果在派生类中提供了实现,则该控件会自动调用方法。The WebPartManager control automatically invokes the OnClosing method if you provide an implementation in a derived class.

适用于

另请参阅