다음을 통해 공유


WebPart.AllowRemove Property

NOTE: This API is now obsolete.

Gets or sets whether the Web Part can be removed from a Web Part Page by controlling whether the IsIncluded property can be set to false.

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

Syntax

'Declaration
<WebPartStorageAttribute(Storage.Shared)> _
<ObsoleteAttribute("Use AllowClose instead.")> _
Public Property AllowRemove As Boolean
    Get
    Set
'Usage
Dim instance As WebPart
Dim value As Boolean

value = instance.AllowRemove

instance.AllowRemove = value
[WebPartStorageAttribute(Storage.Shared)]
[ObsoleteAttribute("Use AllowClose instead.")]
public bool AllowRemove { get; set; }

Property Value

Type: System.Boolean
true if the Web Part can be removed; otherwise, false. The default value is true.

Remarks

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 SharePoint Foundation-compatible HTML editor, such as SharePoint Designer.

See Also

Reference

WebPart Class

WebPart Members

Microsoft.SharePoint.WebPartPages Namespace