This documentation is archived and is not being maintained.

ConnectionsZone::OnDisplayModeChanged Method

Raises the DisplayModeChanged event.

Namespace:  System.Web.UI.WebControls.WebParts
Assembly:  System.Web (in System.Web.dll)

protected:
virtual void OnDisplayModeChanged(
	Object^ sender, 
	WebPartDisplayModeEventArgs^ e
) override

Parameters

sender
Type: System::Object

The sender of the event.

e
Type: System.Web.UI.WebControls.WebParts::WebPartDisplayModeEventArgs

A WebPartDisplayModeEventArgs that contains the event data.

This method raises the DisplayModeChanged event and provides a custom handler for it. After a Web page enters or exits the connect display mode, this method carries out several steps unique to the ConnectionsZone control. The method cancels any connection activity that is pending at this point, ensures that no child controls from the connection user interface (UI) are displayed by setting the ChildControlsCreated property to false, and sets the connection UI to a mode in which it can display information about existing connections, if a user proceeds with the process of creating a connection.

To add specialized handling to the handling provided in the OnDisplayModeChanged method, developers can inherit from the ConnectionsZone class and override this method. As an alternative, developers can also provide a handler for the DisplayModeChanged event on the WebPartManager control by adding an OnDisplayModeChanged attribute to the <asp:webpartmanager> element in a Web page, and assigning to it the value of a custom method to handle the event. In this method, developers can check the current value of the DisplayMode property, and if it is ConnectDisplayMode, they can carry out the desired changes to the ConnectionsZone control.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0
Show: