|
The Application object is created when the first .asp page is requested and remains there until the server shuts down. All the variables created with application object have application level scope. 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.
Creating Application Variables
Application level variables are shared by more than one user at a time and they are accessed and changed by any page in the application. Application variables are created in Global.asa file.
<script language="vbscript" runat="server">
Sub Application_OnStart
application("apptitle")="Testing Application"
End Sub
</script>
Retrieving Application Variables
You can retrieve the application variables as follows.
<%
Response.Write(Application("apptitle"))
%>
|