WebPartConnectionsCancelEventHandler 委托

定义

表示将处理 WebPartsConnecting 控件的 WebPartsDisconnecting 事件或 WebPartManager 事件的方法。Represents the method that will handle the WebPartsConnecting event or WebPartsDisconnecting event of a WebPartManager control.

public delegate void WebPartConnectionsCancelEventHandler(System::Object ^ sender, WebPartConnectionsCancelEventArgs ^ e);
public delegate void WebPartConnectionsCancelEventHandler(object sender, WebPartConnectionsCancelEventArgs e);
type WebPartConnectionsCancelEventHandler = delegate of obj * WebPartConnectionsCancelEventArgs -> unit
Public Delegate Sub WebPartConnectionsCancelEventHandler(sender As Object, e As WebPartConnectionsCancelEventArgs)

参数

sender
Object

事件源。The source of the event.

继承
WebPartConnectionsCancelEventHandler

注解

WebPartsConnecting事件OnWebPartsConnecting由方法引发, 并通知连接进程已开始 (例如, 用户已选择控件并单击了连接谓词), 但尚未完成。The WebPartsConnecting event is raised by the OnWebPartsConnecting method, and it signals that the connection process has begun (for example, a user has selected a control and clicked a connect verb), but is not yet completed. 事件提供了在连接完成前取消连接的机会。The event provides an opportunity to cancel a connection before it is complete. 如果连接成功完成, 则此事件后跟WebPartsConnected事件。If the connection is successfully completed, this event is followed by the WebPartsConnected event.

此事件由方法引发, 它指示用户单击了DisconnectWebParts断开连接谓词, 或已调用方法。 OnWebPartsDisconnecting WebPartsDisconnectingThe WebPartsDisconnecting event is raised by the OnWebPartsDisconnecting method, and it signals the fact that a user has clicked a disconnect verb, or the DisconnectWebParts method has otherwise been called. 事件提供了一种方法, 可在连接完成前取消结束连接的过程。The event provides an opportunity to cancel the process of ending a connection before it is complete. 如果连接成功结束, 则此事件后跟WebPartsDisconnected事件。If the connection is ended successfully, this event is followed by the WebPartsDisconnected event.

引发WebPartConnectionsCancelEventHandler WebPartsConnecting或事件WebPartsDisconnecting时, 将调用在委托中指定的方法。The method specified in the WebPartConnectionsCancelEventHandler delegate is called when a WebPartsConnecting or WebPartsDisconnecting event is raised.

页面开发人员可以通过将OnWebPartsDisconnectingOnWebPartsConnecting属性添加到<asp:webpartmanager>元素, 并为属性分配自定义方法名称, 为事件添加自定义处理程序。Page developers can add custom handlers for the events by adding the OnWebPartsDisconnecting and OnWebPartsConnecting attributes to the <asp:webpartmanager> element, and assigning custom method names to the attributes. 还可以通过编程方式分配自定义处理程序。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.

适用于