Export (0) Print
Expand All

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 override int ResetUserState(
	string path,
	DateTime userInactiveSinceDate
)

Parameters

path
Type: System.String

The path of the personalization data to be deleted. This value can be null but cannot be an empty string ("").

userInactiveSinceDate
Type: System.DateTime

The date indicating the last activity.

Return Value

Type: System.Int32
The count of rows deleted from the underlying data store.

ExceptionCondition
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-null, 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 null.

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

  • The UserInactiveSinceDate property cannot be null.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0, 2.0

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft