ASP Tutorials - Herong's Tutorial Examples
Dr. Herong Yang, Version 5.00

"Collection" Class in VBScript

This section describes the Collection class and methods to access member elements in VBScript language.

Collection: A class representing a collection of ordered elements. The stored elements can be referred by an index number or by the key associated with the elements. It offers the following methods and properties based on the documentation of Visual Basic .NET:

  • "Item(i|key)": Property to return the element of the specified index or key. Item() is the default method of a collection object, so you can call this method without the method name, like object(i|key), instead of object.Item(i|key).
  • "Count": Property to return the number of elements in the collection.
  • "Add(element)": Method to add an element at the end of the collection without a key.
  • "Add(element, key)": Method to add an element at the end of the collection with a key.
  • "Remove(i|key)": Method to remove the element of the specified index or key.

Unfortunately, I was not able to write an ASP page with a new collection object.

Last update: 2003.

Table of Contents

 About This Book

 ASP (Active Server Pages) Introduction

 IIS (Internet Information Services) 5.0

 MS Script Debugger

VBScript Language

 Using VBScript in ASP Pages

 Mixing VBScript Statements with Static HTML Text

 Variables and Expressions in VBScript

 Arrays and Loops in VBScript

"Collection" Class in VBScript

 ASP Built-in Run-time Objects

 ASP Session

 Creating and Managing Cookies

 Managing Sessions with and without Cookies

 scrrun.dll - Scripting Runtime DLL

 Managing Response Header Lines

 Calculation Speed and Response Time

 ADO (ActiveX Data Object) DLL

 Working with MS Access Database

 Guest Book Application Example

 References

 PDF Printing Version

Dr. Herong Yang, updated in 2010
"Collection" Class in VBScript