Session.Contents collection

Collection of variables stored in the Session object.

Usage

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

Details

The Contents collection is an associative array that maps key strings to values, available to the entire application. This is similar to the Application.Contents collection, but do not require locking to change, since only a single client has access to a session.

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 Session.StaticObjects collection), JScript associative arrays and objects, PerlScript hashes and objects, etc.

Session.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.