Proprietà Key in ASP
Definizione e uso
L'attributo Key nel Dictionary oggetto imposta un nuovo valore per la chiave esistente.
Sintassi:
DictionaryObject.Key(key)=newkey
Parametro | Descrizione |
---|---|
key | Obbligatorio. Nome della chiave da modificare. |
newkey | Obbligatorio. Nuovo nome della chiave. |
Esempio
<% Dim d Set d=Server.CreateObject("Scripting.Dictionary") d.Add "re","Rosso" d.Add "gr","Verde" d.Add "bl","Blue" d.Add "pi","Pink" d.Key("re")="r" Response.Write("Il valore della chiave r è: " & d.Item("r")) %>
Output:
Il valore della chiave r è: Rosso