PersonalizationStateInfoCollection.Item Property (String, String)


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Gets an element from the collection based on the specified parameters.

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

public PersonalizationStateInfo this[
	string path,
	string username
] { get; }


Type: System.String

The relative application path of the personalization state object to be retrieved.

Type: System.String

The user name of the UserPersonalizationStateInfo object to be retrieved.

Property Value

Type: System.Web.UI.WebControls.WebParts.PersonalizationStateInfo

An element from the collection based on the specified parameters.

Exception Condition

path is null.

This property is the default indexer for the collection. If only path is provided, the property returns a SharedPersonalizationStateInfo instance. If both path and username are provided, the property returns a UserPersonalizationStateInfo instance for the combination of path and username.

If path (in the case that username is set to null) does not exist, or if username and path do not exist, null is returned.

.NET Framework
Available since 2.0
Return to top