Features
Ask DevGuru
ASP Resources
Find the Bug
Knowledge Base
Links
Tips of the Week
Tutorials
Products
dgCalendar
dgCharge New!
dgChart New!
dgFileUpload
dgReport New!
dgSort
dgTree
Site
Authoring
Coming Soon
DevGuru Resume
Link to Us
Merchandise
Sponsorships
Testimonials
What's New
Technologies
ADO 2.6
ASP
CSS2
HTML
JavaScript
Jet SQL
Transact-SQL Syntax
VBScript
WML
WMLScript
WSH
XML DOM
All Methods
METHOD: Dictionary.Add
Implemented in version 2.0
object.
Add
keyvalue, itemvalue
The
Add
method is used to add a new key/item pair to a
Dictionary
object. Be aware that an error will occur if the key already exists.
The following example adds several key/item pairs to a
Dictionary
object called 'guitars'.
Code:
<%
dim guitars
set guitars=CreateObject("Scripting.Dictionary")
guitars.Add "e", "Epiphone"
guitars.Add "f", "Fender"
guitars.Add "g", "Gibson"
guitars.Add "h", "Harmony"
%>
Output:
"Epiphone"
"Fender"
"Gibson"
"Harmony"
Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information