- CatalogZone Web Server Control
in ASP.NET environment,This article describes you how to work with CatalogZone Web Control.The primary function of the CatalogZone control is that allows the end users to personalize Web pages and save their personalized settings. The CatalogZone control serves as the primary control in the Web Parts control set for hosting CatalogPart controls on a Web page. during run time, The CatalogZone control supports end users to add WebPart controls to a Web Parts page.
Zone control can create a Web Parts zone which is a type of CompositeControl designed to contain other controls. The major goal of a zone are to setting the controls it contains, and to provide a common user interface (UI) for those controls.It inherits from the CatalogZoneBase class, and most of its behavior is inherited from that class. The CatalogZone class essentially adds to the base class a zone template, which is an implementation of the ITemplate interface.
Set CatalogZone Control
During a page is running,If any user switch back from a page to Catalog-Display mode,then the CatalogZone control becomes visible.
CatalogPart Controls
- PageCatalogPart -Maintains references to controls that have been closed on a page. These controls can be reopened (added back to the page) by users.
- DeclarativeCatalogPart -Contains references to controls that are declared in a Web Parts catalog in the markup of a Web page. These controls can be added to a Web page by users.
- ImportCatalogPart -Provides the UI for a user to upload a definition file (an XML file with a .WebPart extension and a specified format that contains state information) for a control to a catalog, so that the control can be added to a Web page.
the following code snippets demonstrates how to work with the Catalogzone Control
in .aspx page,
-
<%@ register TagPrefix="uc1"
TagName="DisplayModeMenuCS"
Src="DisplayModeMenuCS.ascx" %>
<%@ Register TagPrefix="aspSample"
Namespace="Samples.AspNet.CS.Controls" %>
<html >
<head id="Head1" runat="server">
<title>Example</title>
</head>
<body>
<form id="form2" runat="server">
<asp:WebPartManager ID="Wp1" runat="server" />
<uc1:DisplayModeMenuCS ID="DisplayModeMenu1" runat="server" />
<asp:WebPartZone ID="WebPartZone1" runat="server">
<ZoneTemplate>
<asp:BulletedList
ID="BulletedList1"
Runat="server"
DisplayMode="HyperLink"
Title="Favorite Links" >
<asp:ListItem Value="http://www.gmail.com">
Gmail
</asp:ListItem>
</asp:BulletedList>
<aspsample:textdisplaywebpart id="wp1" runat="server"
Title="My Text Display WebPart" />
</ZoneTemplate>
</asp:WebPartZone>
<aspSample:MyCatalogZone ID="CatalogZone1" runat="server">
<ZoneTemplate>
<asp:ImportCatalogPart id="ImportCatalogPart1"
runat="server" />
</ZoneTemplate>
</aspSample:MyCatalogZone>
</form>
</body>
</html>
-
- Related Links
-
9185debd-0b6d-4712-8282-17cef8059be3|0|.0