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 Properties
Property: Dictionary.Item
Implemented in version 2.0
The
Item
property sets or returns the value of an item for the specified key and Dictionary.
Keyvalue
is the value of the key associated with the item being returned or set and
itemvalue
is an optional value which sets the value of the item associated with that key.
If the specified key is not found when attempting to change an item, a new key/item pair is added to the dictionary. If the key is not found while trying to return an existing item, a new key is added and the item value is left empty.
Code:
<%
Set d = CreateObject("Scripting.Dictionary")
d.Add "a", "Alvis" 'Add some keys and items.
d.Add "b", "Buick"
d.Add "c", "Cadillac"
d.Item("c") = "Corvette"
Response.Write "Value associated with key 'c' has changed to " d.Item("c")
%>
Output:
"Value associated with key 'c' has changed to Corvette"
Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information