Application variables can be accessed and changed by any page in an application.
You can create Application variables in "Global.asa" like this:
<script language="vbscript" runat="server">
Sub Application_OnStart
application("vartime")=""
application("users")=1
End Sub
</script>
Sub Application_OnStart
application("vartime")=""
application("users")=1
End Sub
</script>
In the example above we have created two Application variables: "vartime" and "users".
You can access the value of an Application variable like this:
There are
<%
Response.Write(Application("users"))
%>
active connections.
<%
Response.Write(Application("users"))
%>
active connections.
Practice Excercise Practice now