I want to make my variable static or "global" - so the same effect as static in .NET; every session that accesses it gets the same result, and if one session modifies it it affects everyone else too.
How can I achieve this in Classic ASP?
I want to make my variable static or "global" - so the same effect as static in .NET; every session that accesses it gets the same result, and if one session modifies it it affects everyone else too.
How can I achieve this in Classic ASP?
using a session variable
the scope will be the user...
if you want to wide the scope to ALL users that are in the website, then you use an Application variable
you can reset or handle this in the global.asa file as well
This is a common thing to do:
global.asa file:
default.asp file:
If you want to have a variable that is accessible application wide, you can use the application object. Be sure to use Application.Lock/Unlock to prevent any problems.