WebPartManager.OnDisplayModeChanged Method (WebPartDisplayModeEventArgs)
Assembly: System.Web (in System.Web.dll)
Notes to Inheritors:
You can override the OldDisplayMode property. Or you might want to hide certain content, or display a certain control.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
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.
Available since 2.0