Assembly: System.Web (in system.web.dll)
In the Web Parts control set, a zone is a region on a Web page that contains server controls, and provides modular layout with a consistent user interface (UI) for the contained controls.
There are two general types of zone controls that derive from the base WebZone class: WebPartZoneBase zones and ToolZone zones. The WebPartZoneBase zones contain server controls (which can be custom WebPart controls, or other server controls including ASP.NET controls and user controls). These controls form the primary UI of a Web page and are visible in all the possible display modes, unless they are hidden programmatically or by a user.
The ToolZone zones are special helper zones that appear only when a page is in certain display modes associated with the zone, and these zones also contain special server controls that enable users to modify the layout, appearance, properties, and content of Web pages from within a browser. Developers can inherit from the base ToolZone class, or any of the derived ToolZone zones, to create custom zones.
The Web Parts control set contains three types of ToolZone zones, described in the following table.
Tool zone type
Contains controls used to edit WebPart and server control properties on a page.
Contains CatalogPart controls, which in turn contain WebPart controls that users can add to a page.
Does not contain declarative markup elements; this zone is self-contained. At run time, it renders a special UI that enables users to manage connections between WebPart controls.
The ToolZone base class provides methods and properties that are useful to derived zones. It contains RenderHeader and RenderFooter methods, which override the base methods from the WebZone class, and render buttons and other UI attributes for the header and footer of a zone. There are also several members for handling verbs, which are common UI actions that users can perform in the various zones. Members related to handling verbs include: RenderVerb, RenderVerbs, and HeaderCloseVerb.
The ToolZone contains two overloaded methods, which add WebPartDisplayMode objects to the AssociatedDisplayModes collection. This collection of associated display modes determines which display modes are related to a particular type of zone (in other words, it determines in which display modes a zone is visible). The union of all associated display modes for all the ToolZone zones on a given Web page determines which display modes (besides the normal browse mode) are possible or supported on the page. The collection of supported display modes for a page is contained in the SupportedDisplayModes property.
At any given time, only one display mode can be active on a page. The currently active display mode is referenced in the DisplayMode property.
The ToolZone class also contains a number of style properties that contain style attributes for the various UI elements of a zone. Some ToolZone style properties include EditUIStyle, HeaderVerbStyle, InstructionTextStyle, and LabelStyle.Notes to Inheritors: The Web Parts control set contains the specialized zones listed above in the Remarks section, and you can often derive from one of them to add custom behavior to a zone. However, for more programmatic control over the rendering of a zone, you should inherit directly from the ToolZone class. For example, you might want to create a custom zone for a specialized task, such as a search zone. To create a custom zone, you can override any of the virtual ToolZone members to fully customize the rendering, or you can override only a specific member. Optionally, you can also create a custom display mode for your zone by inheriting from the WebPartDisplayMode class, but this is not required. In the constructor of your zone, you should add the various display modes in which you want your zone to be displayed to a WebPartDisplayModeCollection object, so that your zone is visible when the page is in those display modes.
Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter EditionThe Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.