Pseudo-Objects in Active Server Pages, Page 2
%
' 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
%>
0 Comments (click to add your comment)
Networking Solutions
