Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

ASP Key Property

ASP Key Property


Dictionary Object Reference Complete Dictionary object reference manual


The Key property sets a new value for an existing key in a Dictionary object.

Syntax

DictionaryObject.Key(key)=newkey

Parameters Description
key Required. The name of the key to modify.
newkey Required. The new name of the key.

Example

<%

Dim d

Set d=Server.CreateObject("Scripting.Dictionary")

d.Add "re","Red"

d.Add "gr","Green"

d.Add "bl","Blue"

d.Add "pi","Pink"

d.Key("re")="r"

Response.Write("The value of key r is: " & d.Item("r"))

%>

Output:

The value of key r is: Red


Dictionary Object Reference Complete Dictionary object reference manual