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^ default [String^] {
	PersonalizationEntry^ get (String^ key);
	void set (String^ key, PersonalizationEntry^ value);
}
/** @property */
public PersonalizationEntry get_Item (String key)

/** @property */
public void set_Item (String key, PersonalizationEntry value)

Not applicable.

Parameters

key

The key of the entry to be retrieved or changed.

Property Value

A PersonalizationEntry representing custom personalization information identified by the key parameter.

Exception typeCondition

ArgumentNullException

key is a null reference (Nothing in Visual Basic).

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, a null reference (Nothing in Visual Basic) 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 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: