WebPartPersonalization::GetAuthorizationFilter Method (String^)

 

Retrieves the authorization filter, if any, associated with the specified Web Parts control.

Namespace:   System.Web.UI.WebControls.WebParts
Assembly:  System.Web (in System.Web.dll)

public protected:
virtual String^ GetAuthorizationFilter(
	String^ webPartID
)

Parameters

webPartID
Type: System::String^

The ID of the Web Parts control associated with the filter to be retrieved.

Return Value

Type: System::String^

The authorization filter for the specified Web Parts control.

Exception Condition
InvalidOperationException

An attempt was made to retrieve an authorization filter when IsEnabled is false by calling this method too early in the page life cycle.

- or -

An attempt was made to retrieve an authorization filter and no personalization state has been loaded.

- or

The personalization state returned from the data store was null.

ArgumentException

webPartID is null or an empty string ("").

This method retrieves the authorization filter, if any, associated with the Web Parts control identified by webPartID. Each Web Parts control that is serialized and managed by personalization is associated with a webPartID parameter. At run time, a page's WebPartManager control can filter the controls displayed on a page by determining whether each Web Parts control is authorized. This authorization information is stored as a string in the data associated with each Web Parts control.

.NET Framework
Available since 2.0
Return to top
Show: