September 23, 2018
Hot Topics:

Pseudo-Objects in Active Server Pages

  • October 14, 1999
  • By Thornton Rose
  • Send Email »
  • More Articles »

' DictionaryObj.asp - Simple program to show usage of Dictionary object.

' Force variables to be declared.

option explicit

' Declare variables.

dim objFoo

' Create empty Dictionary object.

set objFoo = Server.CreateObject("Scripting.Dictionary")

' Add items.

' Note: The item keys are case-sensitive. If you add an item with the key
' "color", you cannot retrieve it with the key "Color".

objFoo.Add "color", "blue"
objFoo.Add "size", 1

' Show object.

Response.Write "

" & vbCrLf
Response.Write "objFoo.color = " & objFoo("color") & vbCrLf
Response.Write "objFoo.size = " & objFoo("size") & vbCrLf
Response.Write "
" & vbCrLf %>

Page 2 of 11

Comment and Contribute


(Maximum characters: 1200). You have characters left.



Enterprise Development Update

Don't miss an article. Subscribe to our newsletter below.

By submitting your information, you agree that developer.com may send you developer offers via email, phone and text message, as well as email offers about other products and services that developer believes may be of interest to you. developer will process your information in accordance with the Quinstreet Privacy Policy.


Thanks for your registration, follow us on our social networks to keep up-to-date