WebPartCancelEventHandler 委托
定义
表示将处理 SelectedWebPartChanging 类的 WebPartClosing、WebPartDeleting 或 WebPartManager 事件的方法。Represents the method that will handle the SelectedWebPartChanging event, WebPartClosing event, or WebPartDeleting event of the WebPartManager class.
public delegate void WebPartCancelEventHandler(System::Object ^ sender, WebPartCancelEventArgs ^ e);
public delegate void WebPartCancelEventHandler(object sender, WebPartCancelEventArgs e);
type WebPartCancelEventHandler = delegate of obj * WebPartCancelEventArgs -> unit
Public Delegate Sub WebPartCancelEventHandler(sender As Object, e As WebPartCancelEventArgs)
参数
- sender
- Object
事件源。The source of the event.
包含事件数据的 WebPartCancelEventArgs。A WebPartCancelEventArgs that contains the event data.
注解
WebPartCancelEventHandler SelectedWebPartChanging 引发事件、 WebPartClosing 事件或事件时,将调用委托中指定的方法 WebPartDeleting 。The method specified in the WebPartCancelEventHandler delegate is called when a SelectedWebPartChanging event, WebPartClosing event, or WebPartDeleting event is raised.
页面开发人员可以通过将 OnSelectedWebPartChanging 属性、 OnWebPartClosing 属性或 OnWebPartDeleting 属性添加到 <asp:webpartmanager> 页面中的元素,并为属性分配自定义方法名称,为 Web 部件事件提供自定义处理程序。Page developers can provide custom handlers for Web Parts events by adding an OnSelectedWebPartChanging attribute, OnWebPartClosing attribute, or OnWebPartDeleting 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.
扩展方法
| GetMethodInfo(Delegate) |
获取指示指定委托表示的方法的对象。Gets an object that represents the method represented by the specified delegate. |