• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 32. Writing Active Server Pages > Using the ASP Scripting Objects

Using the ASP Scripting Objects

Beyond the intrinsic objects and the ADO object, there is another class of ASP objects called the scripting objects. These objects are supported by the scrrun.dll file that comes as part of your IIS server.

The Dictionary Object

There are two major types of scripting object. The first is the Dictionary object, which lets you store key/value pairs. After the key/value pairs are stored, you can then look up values by searching for the associated keys in the Dictionary object. As an example of why you might need a Dictionary object, consider that states are often stored in a database table according to their two-letter abbreviations, but you may want to spell out the full state name as part of your output. In this case, you could set up a Dictionary object that maps state abbreviations (the keys) to the full state names (the values). Then, when you need to change an abbreviation to the full name, you just look up the abbreviation in the Dictionary object and use the value associated with it.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint