WebPartManager mgr = WebPartManager.GetCurrentWebPartManager(Page);
mgr.Personalization.ResetPersonalizationState();
To reset state of a particular user, use the following code snippet:
For managing user state, refer to http://msdn2.microsoft.com/en-us/library/ms366517.aspx
// Reset the user.
if (! PersonalizationAdministration.ResetUserState("~/Default.aspx", txtUser.Text))
{
Response.Write("The user could not be found or the user has not personalized this page");
}
No comments:
Post a Comment