WebPartZoneBase.ConnectWebPart(WebPart) 方法

定义

开始创建两个 WebPart 控件之间的连接的过程。Initiates the process of creating a connection between two WebPart controls.

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

参数

webPart
WebPart

启动与另一选定 WebPart 控件间的连接的 WebPart 控件。The WebPart control that initiates the connection with another selected WebPart control.

例外

webPartnullwebPart is null.

注解

仅当页面处于连接显示模式(ConnectDisplayMode)时,才能调用 ConnectWebPart 方法。The ConnectWebPart method can be called only when the page is in connect display mode (ConnectDisplayMode). 方法又调用 BeginWebPartConnecting 方法,该方法完成了完全连接两个 WebPart 控件所需的几个步骤。The method in turn calls the BeginWebPartConnecting method, which completes the several steps necessary to fully connect two WebPart controls. 方法只应由派生 WebPartZoneBase 区域(如 WebPartZone)使用。The method should only be used by derived WebPartZoneBase zones such as WebPartZone.

适用于

另请参阅