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

              











METHOD:  Dictionary.Exists

Implemented in version 2.0
 
object.Exists (keyvalue)
 
The Exists method is used to determine whether a key already exists in the specified Dictionary. Returns True if it does and False otherwise.

The following code uses the Exists method to see if the key with the value of 'g' exists in the Dictionary object and, if it does, changes its corresponding item value.

Code:
<%
dim guitars
set guitars=CreateObject("Scripting.Dictionary")
guitars.Add "e", "Epiphone"
guitars.Add "f", "Fender"
guitars.Add "g", "Gibson"
guitars.Add "h", "Harmony"
If guitars.Exists("g") Then
   guitars.Item("g") = "Guild"
End If
%>

 
Output:
"Epiphone"
"Fender"
"Guild"
"Harmony"


Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information