Quick References
ADO
ASP
CSS2
HTML
JavaScript
Jet SQL
VBScript
WML
WMLScript
WSH
XHTML
XML DOM
XSLT
Features
Knowledge Base
Tutorials
Partners
ZVON.ORG
XML
Planet Source Code
VisualBuilder
Web Design
Your HTML Source
XML/XSLT Forums
ASPAlliance
Scripts
Programmers Heaven
Tek-Tips Forums
Developer Fusion
Code Project
All Methods
METHOD: Dictionary.Items
Implemented in version 2.0
[arrayname = ]
object.
Items
The
Items
method can be used to retreive all the items in a
Dictionary
object
and place them in an array. We can then iterate through the items using a
For
....
Next
loop.
The following code demonstrates this, using the
Dictionary
object's
Count
property to determine the amount of key/item pairs.
Code:
<%
dim guitars, arrayItems, i
set guitars=CreateObject("Scripting.Dictionary")
guitars.Add "e", "Epiphone"
guitars.Add "f", "Fender"
guitars.Add "g", "Gibson"
guitars.Add "h", "Harmony"
arrayItems = guitars.Items
for i = 0 to guitars.Count -1
Response.Write "<br>" & arrayItems(i)
next
%>
Output:
"Epiphone"
"Fender"
"Gibson"
"Harmony"
Copyright 1999-2005 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information