ASP Item Property
Definition and Usage
The Item property sets or returns the value of a specific item in the Dictionary object.
Syntax:
DictionaryObject.Item(key)[=newitem]
Parameter | Description |
---|---|
key | Required. Specifies the key associated with the item. |
newitem | Optional. Specifies the value associated with the key. |
Instance
<% Dim d Set d=Server.CreateObject("Scripting.Dictionary") d.Add "re","Red" d.Add "gr","Green" d.Add "bl","Blue" d.Add "pi","Pink" Response.Write("The value of key bl is: " & d.Item("bl")) %>
Output:
The value of key bl is: Blue