The ASP Application object is used to share information between all users of a specific aspapplication program. All ASP files are part of a virtual directory in IIS, the same aspapplication program.
The Application.Contents collection contains all the items, and also adds commands for Aspapplication objects and ASP scripts.
The Application.staticobjects collection contains all the objects and adds <OBJECT> tags to the ASP application program objects.
You can store variables into the Application.Contents collection method as follows:
Application (otalapplicationusers) = 255
You can read and display a variable stored in the Application object and have the following ASP code:
Response.Write Application (Otalapplicationusers)
Always remember that application objects share the Aspapplication program between all users.
2 ASP Application main object methods Application.Lock and Application.UnLock. The Aspapplication program objects are common to all users of the Aspapplication program, This application.lock and Application.UnLock method guarantees that no more than one user can change a variable stored in a Application object at any given moment.
Here's how to use the Application.Lock and Application.UnLock methods to change a variable stored in a Application object:
Application.Lock
Application (otalapplicationusers) =application (otalapplicationusers) + 1
Application.UnLock