ASP Application Object
-- Learning is not just about technology, but also about dreams!
- Home
- HTML
- JavaScript
- CSS
- Vue
- React
- Python3
- Java
- C
- C++
- C#
- AI
- Go
- SQL
- Linux
- VS Code
- Bootstrap
- Git
- Local Bookmarks
ASP Tutorial
- ASP Tutorial
- ASP Introduction
- ASP Installation
- ASP Syntax
- ASP Variables
- ASP Procedures
- ASP Forms
- ASP Cookies
- ASP Session
- ASP Application
- ASP #include
- ASP Global.asa
- ASP Send Email
ASP Objects
- ASP Response
- ASP Request
- ASP Application
- ASP Session
- ASP Server
- ASP Error
- ASP FileSystem
- ASP TextStream
- ASP Drive
- ASP File
- ASP Folder
- ASP Dictionary
- ASP ADO
ASP Components
ASP and AJAX
ASP Summary
ASP Examples
ASP Application Object
A group of ASP files working together to accomplish a certain task is called an application. The Application object is used to tie these files together.
Application Object
An application on the Web can be a group of ASP files. These ASP files work together to accomplish a certain task. The Application object is used to tie 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, while the Session object has a one-to-one relationship with each user.
The Application object stores information (such as database connection information) that is used by many pages in the application. This information can be accessed from any page. You can also change this information in one place, and the changes will automatically be reflected on all pages.
The collections, methods, and events of the Application object are described below:
Collections
| Collection | Description |
|---|---|
| Contents | Contains all items that were appended to the application through script commands. |
| StaticObjects | Contains all objects that were appended to the application using the HTML <object> tag. |
Methods
| Method | Description |
|---|---|
| Contents.Remove | Deletes an item from the Contents collection. |
| Contents.RemoveAll() | Deletes all items from the Contents collection. |
| Lock | Prevents other users from modifying variables in the Application object. |
| Unlock | Enables other users to modify variables in the Application object (after being locked with the Lock method). |
Events
| Event | Description |
|---|---|
| Application_OnEnd | This event occurs when all user sessions have ended and the application is shut down. |
| Application_OnStart | This event occurs before the first new session is created (i.e., when the Application object is first referenced). |
YouTip