共用方式為


PageCatalogPart Web Server Control Overview

The PageCatalogPart Web server control provides a catalog that keeps references to all WebPart controls (and other server controls that are contained in WebPartZoneBase zones) that a user has closed on a single Web Parts page. The user interface that is provided by the PageCatalogPart control enables the user to add the closed controls back to the page at run time.

This topic contains:

  • Background

  • Code Examples

  • Class Reference

Background

The PageCatalogPart control acts as a page catalog to maintain any controls that were previously added to the page and that a user has closed. Later, the user can add them back to the page. This control is visible only when a Web page is in catalog-display mode, which is a special view that lets users add and remove controls on the page. Only closed controls are added to the page catalog. Add a PageCatalogPart control to your page if you want to provide users with the flexibility of closing and reopening controls.

Note

If your page does not let users close controls, you do not have to add a PageCatalogPart control to the page.

For more information, see ASP.NET Web Parts Controls.

About Closed Controls

Users can close controls on a Web Parts page. A closed control has the following characteristics:

  • It is not visible on the page.

  • It is not rendered on the page.

  • It does not participate in page life-cycle phases.

Closing a control is different from deleting it, which permanently removes it from the page. A user can reopen a closed control instance from a page catalog, but after a user deletes a control, that control cannot be recovered.

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

Concepts

DeclarativeCatalogPart Web Server Control Overview

PageCatalogPart Web Server Control Overview

ImportCatalogPart Web Server Control Overview

Reference

DeclarativeCatalogPart

CatalogZone

System.Web.UI.WebControls.WebParts

Other Resources

ASP.NET Web Parts Controls