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

              











Property:  Dictionary.Key

Implemented in version 2.0
 
object. Keys
 
The Key property lets us change the key value of an existing key/item pair.

Keyvalue is the current key value and newkeyvalue is the value you want to change it to.

If the specified key is not found when attempting to change it, a runtime error will occur

Code:
<%
Set d = CreateObject("Scripting.Dictionary")
d.Add "a", "Alvis" 'Add some keys and items.
d.Add "b", "Buick"
d.Add "c", "Corvette"
d.Key("c") = "d" 
Response.Write "The key associated with the item " & d.Item("d") & " has been changed to 'd'." %>


Output:
The key associated with the item Corvette has been changed to 'd'.


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