Partilhar via


WebPartZone Class

Allows you to create zones that are containers for Web Parts. The properties of this class allow you to specify how the zone will appear on your Web Parts page and also the behavior of the zone itself. For example, when you create the zone object, you can allow personalization and/or customization for the Web Parts placed within the zone.

Inheritance Hierarchy

System.Object
  System.Web.UI.Control
    System.Web.UI.WebControls.WebControl
      System.Web.UI.WebControls.CompositeControl
        System.Web.UI.WebControls.WebParts.WebZone
          System.Web.UI.WebControls.WebParts.WebPartZoneBase
            System.Web.UI.WebControls.WebParts.WebPartZone
              Microsoft.SharePoint.WebPartPages.WebPartZone

Namespace:  Microsoft.SharePoint.WebPartPages
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

Syntax

'Declaration
<AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level := AspNetHostingPermissionLevel.Minimal)> _
Public NotInheritable Class WebPartZone _
    Inherits WebPartZone _
    Implements INamingContainer
'Usage
Dim instance As WebPartZone
[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public sealed class WebPartZone : WebPartZone, 
    INamingContainer

Remarks

The WebPartZone inherits the System.Web.UI.Control.ID property, which is a string value that is used to specify the programmatic identifier assigned to a WebPartZone control. The value of a WebPartZone control's ID property is used to assign the WebPart.ZoneID property of an instance of a WebPart class.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

WebPartZone Members

Microsoft.SharePoint.WebPartPages Namespace