WebPartPersonalization.ResetPersonalizationState Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Resets personalization data for the current page, scope, and user in the underlying data store.
public:
virtual void ResetPersonalizationState();
public virtual void ResetPersonalizationState ();
abstract member ResetPersonalizationState : unit -> unit
override this.ResetPersonalizationState : unit -> unit
Public Overridable Sub ResetPersonalizationState ()
Exceptions
An attempt was made to reset personalization data when the current user is not authorized to modify personalization state.
-or-
The Page instance for the associated WebPartManager is null
.
-or-
The value of the Request property on the WebPartManager control's associated Page instance is null
.
-or-
The WebPartPersonalization instance cannot reference a valid personalization provider.
Remarks
This method resets personalization data for the current page, scope, and user in the underlying data store. As a side effect of the reset, the currently executing page is re-executed by a Transfer call. Note that this transfer re-executes the current page as a GET
request regardless of how the page was originally requested.
This method can be called at any time. Internally, this method calls the ResetPersonalizationState method on the provider. After data is successfully reset, the ShouldResetPersonalizationState property is set to true
. This property is used elsewhere by the WebPartPersonalization instance to bypass extracting personalization data from control properties and saving it if data has already been reset.