WebPartManager.OnWebPartsConnected(WebPartConnectionsEventArgs) 方法

定义

引发 WebPartsConnected 事件,该事件在 WebPart 控件之间建立了连接之后发生。Raises the WebPartsConnected event, which occurs after a connection has been established between WebPart controls.

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

参数

e
WebPartConnectionsEventArgs

包含事件数据的 WebPartConnectionsEventArgsA WebPartConnectionsEventArgs that contains the event data.

注解

OnWebPartsConnected方法在方法的最末尾引发其相应的事件 ConnectWebParts ,这可确保在事件处理程序中的任何代码运行之前完成连接两个控件所需的步骤。The OnWebPartsConnected method raises its corresponding event at the very end of the ConnectWebParts method, which ensures that the steps necessary to connect two controls are completed before any code in the event handler runs.

方法提供了对创建连接过程的编程控制,关联的事件是将用户界面更新 (UI 的便利点) 或通知用户已建立连接。The method provides programmatic control over the process of creating connections, and the associated event is a convenient point at which to update the user interface (UI) or notify a user that a connection has been established.

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

适用于

另请参阅