SqlPersonalizationProvider.ResetUserState Method

Deletes user personalization data from the underlying data store, based on the specified parameters.

Namespace: System.Web.UI.WebControls.WebParts
Assembly: System.Web (in system.web.dll)

public:
virtual int ResetUserState (
	String^ path, 
	DateTime userInactiveSinceDate
) override
public int ResetUserState (
	String path, 
	DateTime userInactiveSinceDate
)
public override function ResetUserState (
	path : String, 
	userInactiveSinceDate : DateTime
) : int
Not applicable.

Parameters

path

The path of the personalization data to be deleted. This value can be a null reference (Nothing in Visual Basic) but cannot be an empty string ("").

userInactiveSinceDate

The date indicating the last activity.

Return Value

The count of rows deleted from the underlying data store.

Exception typeCondition

ArgumentException

path is an empty string.

- or -

The path is greater than 256 characters in length.

This method's parameters have the following restrictions:

  • The path parameter cannot contain wildcard characters.

  • If the path parameter is non-a null reference (Nothing in Visual Basic), then only per-user personalization records associated with path will be deleted.

  • Only per-user personalization records associated with users that are considered inactive since the date specified in the userInactiveSinceDate parameter will be deleted. The exact comparison would be to delete records where the LastActivityDate property is less than or equal to the userInactiveSinceDate parameter.

  • If both parameters are provided, then records that match both constraints are deleted.

  • The path parameter can be a null reference (Nothing in Visual Basic).

  • The path parameter cannot be an empty string after trimming.

  • The UserInactiveSinceDate property cannot be a null reference (Nothing in Visual Basic).

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show: