DeclarativeCatalogPart Web Server Control Overview
The DeclarativeCatalogPart control enables you to add a catalog of WebPart or other server controls to a Web page by using declarative syntax.
This topic contains:
Background
Code Examples
Class Reference
Background
The DeclarativeCatalogPart control enables you to add a catalog of WebPart or other server controls to a Web page. This lets users change the set of controls and the functionality available on a page at run time. A catalog is a list of WebPart or other server controls that is visible when a page is in catalog-display mode. At design time you can add controls to the DeclarativeCatalogPart control and at run time a user can choose which controls to view in the page by selecting them from the catalog list. For more information, see ASP.NET Web Parts Controls.
The DeclarativeCatalogPart control adds a new instance of a control to the Web page when a user selects a control from its catalog at run time. Users can add multiple instances of the same control in a catalog to a Web page.
Enabling a DeclarativeCatalogPart Web Server Control
You must put the DeclarativeCatalogPart control in a CatalogZoneBase zone, such as the CatalogZone zone. The DeclarativeCatalogPart control becomes visible only when a Web page is in catalog display mode.
For code examples that show how to use the CatalogZone control, see the "Example" section in CatalogZone Web Server Control Declarative Syntax and CatalogZone.
Creating an Application-wide Catalog of Controls
The DeclarativeCatalogPart control enables you to set up a catalog of controls that can be used throughout a site. Instead of declaring individual server controls in a DeclarativeCatalogPart control, you can set the WebPartsListUserControlPath property to the path of a user control that contains the list of server controls in the catalog. At run time, the server controls referenced in the user control are loaded into the catalog. This strategy enables multiple pages or sites to reference the same user control to create a catalog. When the list of server controls in the user control is updated, all catalogs based on the user control are updated.
For a code example that shows how to use the WebPartsListUserControlPath property, see the "Example" section in WebPartsListUserControlPath.
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
- DeclarativeCatalogPart
Provides the class definition of the DeclarativeCatalogPart Web server control.
Back to top
See Also
Reference
System.Web.UI.WebControls.WebParts
Concepts
DeclarativeCatalogPart Web Server Control Overview
PageCatalogPart Web Server Control Overview
ImportCatalogPart Web Server Control Overview