WebPartManager.WebPartsConnected 事件


WebPart 控件(或者服务器或用户控件)之间已建立特定连接之后发生。Occurs after a specific connection has been established between WebPart controls (or server or user controls).

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


WebPartsConnected 事件OnWebPartsConnected与方法相关联。The WebPartsConnected event is associated with the OnWebPartsConnected method. 此事件非常有用,因为在知道连接完成后,您可能希望通知用户事实,甚至更改页面的用户界面(UI)。The event is useful because after you know that a connection is complete, you might want to inform the user of the fact, or even change the user interface (UI) of the page. 例如,您可能希望显示一些图形图像,该图像在两个控件之间建议成功连接,或显示简短消息,然后将页面显示模式改回为浏览模式。For example, you might want to display some graphic image that suggests a successful connection between two controls, or display a brief message, and then change the page display mode back to browse mode.

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