Export (0) Print
Expand All
Expand Minimize

WebPartManager.OnDisplayModeChanged Method

Raises the DisplayModeChanged event to indicate that the WebPartManager control has completed the process of switching from one display mode to another on a Web page.

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

protected virtual void OnDisplayModeChanged(
	WebPartDisplayModeEventArgs e


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

A WebPartDisplayModeEventArgs that contains event data associated with a changed display mode.

The OnDisplayModeChanged method in its base form simply raises the DisplayModeChanged event.

Notes to Inheritors

You can override the OnDisplayModeChanged method. For example, after a change of display mode, you might want to change something in the appearance of the user interface (UI), depending on which display mode is contained in the OldDisplayMode property. Or you might want to hide certain content, or display a certain control.

When you override the method, you should normally call the base method as the last step of the overridden method, so that your custom code runs first, and the event is raised last, indicating that the mode change is complete.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0, 2.0

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

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

© 2014 Microsoft