Share via


WebPartManager Web Server Control Overview

The WebPartManager control is the central control of the Web Parts control set. It manages all the Web Parts controls, Web Parts functionality, and Web Parts events.

You must add one (but only one) WebPartManager control to every page that uses Web Parts controls. The WebPartManager control works only with authenticated users.

This topic contains:

  • Background

  • Code Examples

  • Class Reference

Background

The following table lists tasks that are performed by the WebPartManager control.

Task

Control Functionality

Managing Web Parts controls

Manages the controls on a page that provide Web Parts features. This includes WebPart controls, connections, and zones.

Adding and removing Web Parts controls

Provides the methods for adding, deleting, and closing WebPart controls on a page.

Administering connections

Adds and removes connections between controls. Monitors the connections for problems.

Personalizing controls and pages

Enables users to move controls on a page, and displays the modes in which users can edit the appearance, properties, and behavior of controls. Maintains user-specific personalization settings on each page.

Toggling between page views

Switches between page views, and enables users to carry out tasks such as changing page layout or editing controls.

Raising Web Parts life-cycle events

Defines and raises life-cycle events for Web Parts controls, includes events for when controls are added, moved, connected, or deleted.

Enabling import and export of controls

Exports XML streams that contain the state of the properties of WebPart controls, and lets users import the files to personalize controls in other pages or sites.

Associating Web Parts Controls with a WebPartManager Control

To associate a Web Parts control with a WebPartManager control, you put the Web Parts control in a WebPartZone control zone. You must also put a single WebPartManager control on the same page.

For a code example that shows how to use the WebPartManager control, see System.Web.UI.WebControls.WebParts.WebPartManager.

Note

On master pages whose content pages have static Web Parts connections, use a ProxyWebPartManager control in place of a WebPartManager control.

Back to top

Code Examples

Walkthrough: Creating a Web Parts Page

How to: Treat a User Control as a Web Parts Control

How to: Provide Optional Web Parts Controls

How to: Enable Users to Import Web Parts Control Settings

How to: Export Web Parts Control Settings

How to: Build and Run the Data-bound Web Parts Control Example

Walkthrough: Changing Display Modes on a Web Parts Page

How to: Set the Display Mode of a Web Parts Page

Walkthrough: Implementing Web Parts Personalization with a User Control

Walkthrough: Implementing Web Parts Personalization using IPersonalizable

How to: Enable Shared Personalization of Web Parts Pages

How to: Disable Web Parts Personalization

How to: Create Personalizable Properties on a Web Parts Control

How to: Remove User Entries from the Personalization Store

How to: Enable Users to Clear Personalization State

How to: Declare a Static Connection between Two Web Parts Controls

Back to top

Class Reference

Back to top

See Also

Reference

System.Web.UI.WebControls.WebParts

AppearanceEditorPart

BehaviorEditorPart

LayoutEditorPart

PropertyGridEditorPart

Concepts

WebPartZone Web Server Control Overview

EditorZone Web Server Control Overview

CatalogZone Web Server Control Overview

ProxyWebPartManager Web Server Control Overview