WebPartManager.WebPartsConnecting 事件

定义

在创建 WebPart 控件(或放置在 WebPartZoneBase 区域中的服务器控件或用户控件)之间的连接的过程中发生。Occurs during the process of creating a connection between WebPart controls (or server or user controls placed in a WebPartZoneBase zone).

public:
 event System::Web::UI::WebControls::WebParts::WebPartConnectionsCancelEventHandler ^ WebPartsConnecting;
public event System.Web.UI.WebControls.WebParts.WebPartConnectionsCancelEventHandler WebPartsConnecting;
member this.WebPartsConnecting : System.Web.UI.WebControls.WebParts.WebPartConnectionsCancelEventHandler 
Public Custom Event WebPartsConnecting As 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.

页面开发人员可以为事件添加自定义处理程序,方法OnWebPartsConnecting是将属性<asp:webpartmanager>添加到元素,并将自定义方法名称分配给该属性。Page developers can add a custom handler for the event by adding the OnWebPartsConnecting attribute to the <asp:webpartmanager> element, and assigning a custom method name to the attribute.

适用于

另请参阅