How to: Enable Users to Clear Personalization State
In an ASP.NET Web application that uses personalization, some circumstances might require you to remove entries from the personalization store. The simplest approach is to expose themethod through a control on the page so that individual users can remove all personalization data that pertains to them.
To manage the personalization data of multiple users, you must use the various methods of theclass. For more information, see .
To enable users to clear their personalization state
Place aor other control on the page to receive user input.
In the relevant event handler for that control, call themethod of the instance available from the local control, as shown in the following example.
Dim mgr As WebPartManager mgr = WebPartManager.GetCurrentWebPartManager(Page) mgr.Personalization.ResetPersonalizationState()
WebPartManager mgr = WebPartManager.GetCurrentWebPartManager(Page); mgr.Personalization.ResetPersonalizationState();
This results in a call to the ResetPersonalizationState method.