WebPartManager.OnWebPartsConnecting(WebPartConnectionsCancelEventArgs) 方法

定义

引发 WebPartsConnecting 事件,该事件发生于在 WebPart 区域内包含的两个 WebPartZoneBase 或服务器控件或用户控件之间建立连接的过程中。Raises the WebPartsConnecting event, which occurs during the process of establishing a connection between two WebPart or server or user controls contained in a WebPartZoneBase zone.

protected:
 virtual void OnWebPartsConnecting(System::Web::UI::WebControls::WebParts::WebPartConnectionsCancelEventArgs ^ e);
protected virtual void OnWebPartsConnecting (System.Web.UI.WebControls.WebParts.WebPartConnectionsCancelEventArgs e);
abstract member OnWebPartsConnecting : System.Web.UI.WebControls.WebParts.WebPartConnectionsCancelEventArgs -> unit
override this.OnWebPartsConnecting : System.Web.UI.WebControls.WebParts.WebPartConnectionsCancelEventArgs -> unit
Protected Overridable Sub OnWebPartsConnecting (e As WebPartConnectionsCancelEventArgs)

参数

注解

OnWebPartsConnecting 方法WebPartsConnecting引发事件,该事件在两个控件尝试建立连接时发生。The OnWebPartsConnecting method raises the WebPartsConnecting event, which occurs when two controls attempt to establish a connection. 方法提供了取消连接尝试的机会。The method provides the opportunity to cancel the connection attempt. 如果连接成功,则WebPartsConnected执行以下事件。If the connection is successful, the WebPartsConnected event follows.

页面开发人员可以为关联的事件提供自定义处理程序, OnWebPartsConnecting方法是将<asp:webpartmanager>属性添加到网页上的元素,然后将自定义方法名称分配给该属性。Page developers can provide a custom handler for the associated event by adding the OnWebPartsConnecting attribute to the <asp:webpartmanager> element on a Web page, and then assigning a custom method name to the attribute.

继承者说明

创建派生WebPartManager类的OnWebPartsConnecting(WebPartConnectionsCancelEventArgs)开发人员可以重写方法以自定义事件处理。Developers who create derived WebPartManager classes can override the OnWebPartsConnecting(WebPartConnectionsCancelEventArgs) method to customize the event handling.

适用于

另请参阅