This documentation is archived and is not being maintained.

PersonalizationStateQuery.Item Property

Gets or sets the value of the query parameter.

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

public Object this[
	string queryKey
] { get; set; }


Type: System.String

A case-insensitive query string. The value should be one of the following: "PathToMatch", "UserInactiveSinceDate", or "UsernameToMatch".

Property Value

Type: System.Object
The value of the query parameter indicated by the queryKey parameter.


queryKey is null.


queryKey is an empty string ("").

- or -

When trimmed, queryKey results in an empty string.

- or -

A value provided for one of the three properties on PersonalizationStateQuery was of the wrong type.

This property is the default indexer for the PersonalizationStateQuery class. It returns the value of the query parameter indicated by queryKey. You can use PersonalizationStateQuery.this["UsernameToMatch"], PersonalizationStateQuery.this["PathToMatch"] and PersonalizationStateQuery.this["UserInactiveSinceDate"] to set the UsernameToMatch, PathToMatch, and UserInactiveSinceDate properties, respectively. When these three properties are set in the indexer, they are validated against the proper type.

This property returns null if queryKey does not exist.

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

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

.NET Framework

Supported in: 3.5, 3.0, 2.0