The ASP Dictionary.Keys Method is used for returning an array of all the keys in a Dictionary Object.
Syntax:
DictionaryObject.Keys
Example Code: Below code demonstrates the ASP Keys Method.
<%
dim d,a,i
set d=Server.CreateObject("Scripting.Dictionary")
d.Add "m","mango"
d.Add "e","Elephant"
d.Add "n","Nagaland"
Response.Write("
<p>Key values:</p>
")
a=d.Keys
for i=0 to d.Count-1
Response.Write(a(i))
Response.Write("<br>")
next
set d=nothing
%>
Output:
Key values: m e n