WebPartManager.WebPartsDisconnected 事件


在两个 WebPart 或服务器控件之间的连接已终止之后发生。Occurs after a connection between two WebPart or server controls has been terminated.

 event System::Web::UI::WebControls::WebParts::WebPartConnectionsEventHandler ^ WebPartsDisconnected;
public event System.Web.UI.WebControls.WebParts.WebPartConnectionsEventHandler WebPartsDisconnected;
member this.WebPartsDisconnected : System.Web.UI.WebControls.WebParts.WebPartConnectionsEventHandler 
Public Custom Event WebPartsDisconnected As WebPartConnectionsEventHandler 


WebPartsDisconnected 事件OnWebPartsDisconnected与方法相关联。The WebPartsDisconnected event is associated with the OnWebPartsDisconnected method. 此事件非常有用,因为在知道连接终止后,你可能希望通知用户,在代码中执行一些清理操作,或者在用户界面(UI)中进行其他更改。The event is useful because after you know that a connection is terminated, you might want to inform the user, perform some cleanup actions in the code, or make other changes in the user interface (UI).

页面开发人员可以通过将OnWebPartsDisConnected属性添加到页面中的<asp:webpartmanager>元素,并为属性分配自定义方法名称,将自定义事件处理程序与此事件相关联。Page developers can associate a custom event handler with this event by adding the OnWebPartsDisConnected attribute to the <asp:webpartmanager> element in the page, and assigning a custom method name to the attribute.