Share via


WebPart.AuthorizationFilter property

Gets or sets an arbitrary string to determine whether a Web Part is authorized to be added to a page.

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

Syntax

'Declaration
<WebPartStorageAttribute(Storage.None)> _
Public Overrides Property AuthorizationFilter As String
    Get
    Set
'Usage
Dim instance As WebPart
Dim value As String

value = instance.AuthorizationFilter

instance.AuthorizationFilter = value
[WebPartStorageAttribute(Storage.None)]
public override string AuthorizationFilter { get; set; }

Property value

Type: System.String
A string that authorizes a Web Part to be added to a Web page. The default value is String.Empty.

Remarks

The Web Part infrastructure does not implement any default behavior for the AuthorizationFilter property. However, the property is provided so that you can assign an arbitrary string value to a custom Web Part. This property can be checked by SPWebPartManager during its AuthorizeWebPart event to determine whether the control can be added to the page.

See also

Reference

WebPart class

WebPart members

Microsoft.SharePoint.WebPartPages namespace