Easy Tutorial
❮ Met Createtextfile Filesystem Met Movefolder ❯

ASP Application Object


A set of ASP files working together to accomplish a task is referred to as an application. The Application object is used to bundle these files together.


Application Object

An application on the web can be a set of ASP files. These ASP files work together to accomplish a task. The Application object is used to bundle these files together.

The Application object is used to store and access variables from any page, similar to the Session object. The difference is that all users share one Application object, whereas the Session object is unique to each user.

The Application object holds information that will be used by many pages in the application (such as database connection information). This information can be accessed from any page. You can also make changes in one place, and those changes will automatically reflect on all pages.

Descriptions of the Application object's collections, methods, and events are as follows:

Collections

Collection Description
Contents Contains all items added to the application via script commands.
StaticObjects Contains all objects added to the application using the HTML <object> tag.

Methods

Method Description
Contents.Remove Removes an item from the Contents collection.
Contents.RemoveAll() Removes all items from the Contents collection.
Lock Prevents other users from modifying variables in the Application object.
Unlock Allows other users to modify variables in the Application object (after being locked by the Lock method).

Events

Event Description
Application_OnEnd This event occurs when all user sessions end and the application ends.
Application_OnStart This event occurs before the first new session is created (i.e., when the Application object is first referenced).
❮ Met Createtextfile Filesystem Met Movefolder ❯