The ASP Application Object

The Application object is created when the first .asp page is requested after starting the IIS and remains there until the server shuts down. All the variables created with application object have application level scope meaning there by that they are accessible to all the users. All .asp pages in a virtual directory and its subdirectories come under the application scope. So application level variables are shared by more than one user at a time.

Syntax :

Application.method

 

Collections Description
Contents A collection of all the items that have been added to the Application object.
StaticObjects Collection of all the items that have been added to the Application object through <object> tag.

 

Methods Description
Contents.Remove Deletes the specified item from the Application.Contents collection. 
Contents.RemoveAll Deletes all the items from the Application.Contents collection.
Lock Locks the application object so that only one user at a time can modify the values.
UnLock Unlocks the application object allowing other users to modify application level variables.

 

Events Description
 Application_OnEnd This event occurs when the IIS is shut down after Session_OnEnd event. All the variables are destroyed after that.
Application_OnStart This event occurs when the first .asp page is called after starting the IIS. Application level variables can be declared here.

asp ASP 3.0 asp 3.0 object model active active server pages application collections events static objects collection component method methods object objects ASP objects


Back To Top
© 1998 - 2017 psacake.com | My3C's

Version 7.2 | Advertise on this site