using session variable
Session("myVariableName") = "my new value"
the area will be the user ...
if you want to expand the scope for ALL users who are on the website, then you use the Application variable
Application("myVariableName") = "my new value"
you can reset or handle this in global.asa file as well
This is a common thing:
global.asa file :
<script language="vbscript" runat="server"> Sub Application_OnStart Application("visitors") = 0 End Sub Sub Session_OnStart Application.Lock Application("visitors") = Application("visitors") + 1 Application.UnLock End Sub Sub Session_OnEnd Application.Lock Application("visitors") = Application("visitors") - 1 Application.UnLock End Sub </script>
default.asp :
<html> <head> </head> <body> <p>There are <%response.write(Application("visitors"))%> online now!</p> </body> </html>
source share