WebPartPersonalization.GetAuthorizationFilter Method

Note: This method is new in the .NET Framework version 2.0.

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)

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

Parameters

webPartID

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

Return Value

The authorization filter for the specified Web Parts control.

Exception typeCondition

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 a null reference (Nothing in Visual Basic).

ArgumentException

webPartID is a null reference (Nothing in Visual Basic) 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.

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0

Community Additions

ADD
Show: