Share via


WebPart.ZoneID property

Gets or sets the Web Part zone in which to render the Web Part.

Namespace:  Microsoft.SharePoint.WebPartPages
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
<WebPartStorageAttribute(Storage := Storage.Personal)> _
Public Property ZoneID As String
    Get
    Set
'Usage
Dim instance As WebPart
Dim value As String

value = instance.ZoneID

instance.ZoneID = value
[WebPartStorageAttribute(Storage = Storage.Personal)]
public string ZoneID { get; set; }

Property value

Type: System.String
A string that corresponds to the value of the ID property of a WebPartZone control on the Web Part page. The default value is String.Empty.

Remarks

This property can be personalized by individual users. Its WebPartStorageAttribute value is Storage.Personal, which specifies that the property can be stored on a per-user basis. Only users with the Personalize Web Part pages right can set this property. It can be set programmatically, or it can be set through the Web Part task pane in the personal view of the Web-based user interface, or by using a SharePoint Foundation-compatible HTML editor, such as SharePoint Designer.

Attempting to set the ZoneID property to a value longer than 64 characters results in a value truncated to 64 characters.

See also

Reference

WebPart class

WebPart members

Microsoft.SharePoint.WebPartPages namespace