WebPartPersonalization.ChangeScope Method

Changes the current page's PersonalizationScope instance to the scope specified.

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

protected:
virtual void ChangeScope (
	PersonalizationScope scope
)
protected void ChangeScope (
	PersonalizationScope scope
)
protected function ChangeScope (
	scope : PersonalizationScope
)
Not applicable.

Parameters

scope

The new personalization scope for the current page.

Exception typeCondition

InvalidOperationException

If attempting to switch from User scope to Shared scope, the current user does not have the user capability to enter Shared scope.

ArgumentOutOfRangeException

scope is not a valid member of the PersonalizationScope enumeration.

This method changes the currently executing page's personalization scope to the new scope specified by the newScope parameter. This method is the protected helper method that is called by the public ToggleScope method. This protected method exists to handle future extensibility if there are more than two possible scopes to switch between.

If the current scope and newScope are the same value, then this method performs no operation.

Windows 98, Windows Server 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 Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show: