WebPartManager.OnDisplayModeChanging Method
.NET Framework 3.0
Raises the DisplayModeChanging event to indicate that the WebPartManager control is in 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)
Assembly: System.Web (in system.web.dll)
protected void OnDisplayModeChanging ( WebPartDisplayModeCancelEventArgs e )
protected function OnDisplayModeChanging ( e : WebPartDisplayModeCancelEventArgs )
Not applicable.
Parameters
- e
An EventArgs that contains event data associated with a changing display mode.
The OnDisplayModeChanging method in its base form simply raises the DisplayModeChanging event.
Notes to Inheritors: You can override the OnDisplayModeChanging method. For example, as a display mode is changing, you might want to check what the new display mode will be (by using the NewDisplayMode property) and change something in the user interface (UI) based on what the new display mode will be. If you had a custom display mode, you might want to make certain controls visible if the custom mode is going to be the new display mode. When you override this method, you should normally call the base method as the first step of the overridden method, so that the event is raised to indicate a display mode is starting to change. Then, your custom code can make changes in the user interface (UI) before the new display mode is actually displayed.Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.Community Additions
ADD
Show: