Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

WebPartManager.DisplayModeChanging Event

Occurs after a user clicks a verb on a Web page that begins the process of changing to a different display mode.

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

public event WebPartDisplayModeCancelEventHandler DisplayModeChanging
/** @event */
public void add_DisplayModeChanging (WebPartDisplayModeCancelEventHandler value)

/** @event */
public void remove_DisplayModeChanging (WebPartDisplayModeCancelEventHandler value)

In JScript, you can handle the events defined by a class, but you cannot define your own.
Not applicable.

Display modes are an integral part of Web Parts applications. When users switch to a different display mode on a Web page, the page will often take on a very different appearance, depending on the purpose of the new display mode. After a user initiates the process of changing to a new display mode by clicking a verb, you might want to make certain changes in the user interface (UI) by using the NewDisplayMode property to determine what the new display mode will be, and then changing various UI elements accordingly. A useful way to do this is to override the OnDisplayModeChanging method to customize the UI.

NoteNote:

For more information on display modes, see Web Parts Page Display Modes. For more information on consuming events, see How to: Consume Events in a Web Forms Application.

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.

.NET Framework

Supported in: 3.0, 2.0
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.