- WebPartZone Web Server Control
in ASP.NET environment,This article describes you how to work with WebPartZone Web Control.here,The WebPartZone control can act as the primary control of the Web Parts control set for the hosting WebPart controls on a Web page, and provides a common UI for its controls.The major mechanism of the WebPartZone control is to contain WebPart controls that form the main UI of Web Parts applications. A WebPartZone control can be declared in persistence format on a Web page, enabling developers to use it as a template and to add other server controls within the <asp:WebPartZone> element.
WebPartZone UI Elements
Normally, user interface elements can derive from the base class WebZone, . These common UI elements are known collectively as chrome and consist of the peripheral UI elements on all the controls, such as the border, title, header and footer, style characteristics.
The following code snippets explains you the use of the WebPartZone control in a Web Parts page.
in .aspx page,
-
<%@ Register TagPrefix="uc"
Namespace="Samples.AspNet.CS.Controls"
Assembly="MyWebPartZoneCS" %>
<html >
<head id="Head1" runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form2" runat="server">
<div>
<asp:WebPartManager ID="WebPartManager1" runat="server" />
<uc:MyWebPartZone ID="MyWebPartZone1" runat="server">
<VerbStyle Font-Italic="true" />
<PartChromeStyle BackColor="lightblue" />
<PartStyle BackColor="gray" />
<PartTitleStyle Font-Bold="true" />
<ZoneTemplate>
<asp:Calendar ID="Calendar1" runat="server"
Title="My Calendar" />
</ZoneTemplate>
</cc1:MyWebPartZone>
</div>
</form>
</body>
</html>
-
- Related Links
-
5f0e7f42-9ca3-4d1b-b5d3-9876d89f290c|0|.0