Application.Contents collection

Associative array that can be used to store simple values, keyed by name.

Usage

Application.Contents(name)= value ' set an application value
Application(name)= value ' same thing, since Contents is the default member of Application
Application(name) ' use the value
Application.Contents.Remove name ' remove the value
Application.Contents.RemoveAll ' remove all application values

Details

The Contents collection is an associative array that maps key strings to values, available to the entire application. Altering the Application.Contents collection usually occurs in the Application_onStart event in global.asa file, but can also be performed in an ASP page (though the application should be Application.Lock method first).

Note

The Contents collection can only store certain primitive values, like dates and times, numbers, strings, and some arrays. The collection cannot store more complex objects, such as COM objects (see Application.StaticObjects), JScript associative arrays and objects, PerlScript hashes and objects, etc.

Application.Contents Members

Remove(name) method (ASP 3.0)

Deletes the specified item from the collection.

RemoveAll() method (ASP 3.0)

Deletes all items from the collection.