Compartir a través de


Web Parts Page Display Modes

An ASP.NET Web Parts page can enter several different display modes. A display mode is a special state that applies to an entire page, where certain user interface (UI) elements are visible and enabled, while others are invisible and disabled. Display modes enable end users to perform certain tasks to modify or personalize a page, such as editing Web Parts controls, changing the layout of a page, or adding new controls from a catalog of available controls.

How Web Parts Display Modes Work

A page can be in only one display mode at a time. The WebPartManager control contains the implementation for the display modes that are available in the Web Parts control set, and manages all display mode operations for a page.

Typically, you provide a UI that enables users to switch among display modes as needed. You can change a page's display mode programmatically, using the DisplayMode property. For more information on how to change a page's display mode, see Walkthrough: Changing Display Modes on a Web Parts Page.

There are five standard display modes in the Web Parts control set: browse (the normal mode in which an end user views a Web page), design, edit, catalog, and connect. Each of these display modes is derived from the WebPartDisplayMode class. The following table lists the display modes and summarizes their behavior.

Display mode Description

BrowseDisplayMode

Displays Web Parts controls and UI elements in the normal mode in which end users view a page.

DesignDisplayMode

Displays zone UI and enables users to drag Web Parts controls to change the layout of a page.

EditDisplayMode

Displays editing UI elements and enables end users to edit the controls on a page. Allows dragging of controls.

CatalogDisplayMode

Displays catalog UI elements and enables end users to add and remove page controls. Allows dragging of controls.

ConnectDisplayMode

Displays connections UI elements and enables end users to connect Web Parts controls.

See Also

Tasks

Walkthrough: Creating a Web Parts Page
Walkthrough: Changing Display Modes on a Web Parts Page
How to: Set the Display Mode of a Web Parts Page

Reference

Web Parts Control Set Overview
WebPartDisplayMode