PersonalizationDictionary::Item Property (String^)
.NET Framework (current version)
Gets or sets an entry in the personalization dictionary.
Assembly: System.Web (in System.Web.dll)
public: property PersonalizationEntry^ default[ String^ key ] { virtual PersonalizationEntry^ get(String^ key); virtual 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.
| Exception | Condition |
|---|---|
| ArgumentNullException | key is null. |
| 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, null 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.
.NET Framework
Available since 2.0
Available since 2.0
Show: