Export (0) Print
Expand All

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
)

Parameters

scope
Type: System.Web.UI.WebControls.WebParts.PersonalizationScope

The new personalization scope for the current page.

ExceptionCondition
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.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

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

Show:
© 2014 Microsoft