Επεξεργασία

Κοινή χρήση μέσω


WebPartPersonalization.ChangeScope(PersonalizationScope) Method

Definition

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

protected:
 virtual void ChangeScope(System::Web::UI::WebControls::WebParts::PersonalizationScope scope);
protected virtual void ChangeScope (System.Web.UI.WebControls.WebParts.PersonalizationScope scope);
abstract member ChangeScope : System.Web.UI.WebControls.WebParts.PersonalizationScope -> unit
override this.ChangeScope : System.Web.UI.WebControls.WebParts.PersonalizationScope -> unit
Protected Overridable Sub ChangeScope (scope As PersonalizationScope)

Parameters

scope
PersonalizationScope

The new personalization scope for the current page.

Exceptions

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

scope is not a valid member of the PersonalizationScope enumeration.

Remarks

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.

Applies to

See also