WebPart.AllowZoneChange Property

Gets or sets whether the Web Part can be moved to a different zone by controlling whether the ZoneID property can be changed.

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


<WebPartStorageAttribute(Storage.Shared)> _
Public Overrides Property AllowZoneChange As Boolean

Dim instance As WebPart
Dim value As Boolean

value = instance.AllowZoneChange

instance.AllowZoneChange = value
public override bool AllowZoneChange { get; set; }

Property Value

Type: System.Boolean
true if the Web Part's ZoneID property can be changed; otherwise, false. The default value is true.


If the ZoneID property for the Web Part becomes invalid, the AllowZoneChange property is automatically set to true. For example, this will occur when the Web Part zone that originally contained the Web Part is deleted, or if the zone's ID property is changed.

This property cannot be personalized by individual users. The value of its WebPartStorageAttribute is Storage.Shared, which specifies that the property will be stored with the same value for all users. Only users with the Write web pages right can set this property. It can be set programmatically, or it can be set through the Web Part task pane in the shared view of the Web-based user interface, or by using a Windows SharePoint Services-compatible HTML editor, such as Microsoft Office SharePoint Designer 2007.

See Also


WebPart Class

WebPart Members

Microsoft.SharePoint.WebPartPages Namespace