What is the ASP application object?

An application is basically a collection of ASP files for a specific purpose.

The ASP application object accesses and stores the variable values from a web page. All users share a single application object that contains information and is accessible from any page.

There are some events, methods, and collections described below:

Events

  • Application_OnStart: This occurs before the creation of the first session.

  • Application_OnEnd: This occurs when the application ends and all the user sessions are over.

Methods

  • Lock(): This is a security feature that prevents other users from changing or modifying the variables in the application object.

  • Unlock(): This allows other users to change or modify the variables of the application object.

  • Contents.Remove(): This deletes an item from the contents collection.

  • Contents.RemoveAll(): This deletes all items from the contents collection.

Collections

  • Contents: This contains all the items appended to the session through a script command.

  • StaticObjects: This contains all the items with HTML tag.

    Free Resources

    Copyright ©2025 Educative, Inc. All rights reserved