This documentation is archived and is not being maintained.

PersonalizationDictionary::Item Property

Gets or sets an entry in the personalization dictionary.

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

public:
virtual property PersonalizationEntry^ Item[String^ key] {
	PersonalizationEntry^ get (String^ key);
	void set (String^ key, PersonalizationEntry^ value);
}

Parameters

key
Type: System::String

The key of the entry to be retrieved or changed.

Property Value

Type: System.Web.UI.WebControls.WebParts::PersonalizationEntry
A PersonalizationEntry representing custom personalization information identified by the key parameter.

ExceptionCondition
ArgumentNullException

key is nullptr.

ArgumentException

key is either an empty string (""), or trimming key results in an empty string.

This property works with a PersonalizationEntry object representing custom personalization information that is identified by the key parameter. If there is no value for key, nullptr is returned.

If key does not already exist, then key (and its associated value) are added to the dictionary.

Note that you can add a null value to the dictionary, and the indexer can also be used to update the personalization value.

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
Show: