Open In App

ASP Application Object

What is an Application?

An Application is a group of two or more ASP files that use to work together to perform a particular task is called an Application. Similarly, An ASP-based application is defined as the collection of all .asp files in the directory and the sub-directory. The ASP Application Object is a single global object that is used to share information among all the users in the given application. It is used to store and access the variable from any page. It is used to access the information that will hold many pages like a piece of database-connection information. The information that can be changed in one page that will be changed is automatically reflected in many pages. 



Here is the in-built event, methods, and collection of an ASP Application Object:

Collections:



Methods:

Events:

Example: Below ASP code demonstrates the use of contents.collection and removes method. 




<%
Application("'city1")=("Noida")
Application("city2")=("Delhi")
Application("city3")=("Bombay")
Application.Contents.Remove("city2")
for each x in Application.Contents
Response.Write(x & "=" & Application.Contents(x) & "<br>")
next
%>

Output:

city1=Noida
city3=Bombay
Article Tags :