Scope of static Variable in multi-user ASP.NET web application
Static Variables Scope is Application Level.
If you store something in Static variables, definitely your doing something wrong.
If one user saves the data(In Static variable), Same time another user access same page then he will get the same data(First User saved).
So better you can store the values in **Sessions**.
Does static variables retain their values across user sessions?
Yes, that's why you should be VERY careful when you use static variables in a web app. You will run in concurrency issues as more than one thread servicing a request can modify the value of the variable.
While this works in single-user environment, What happens if there are 2 users simultaneously logged in from two computers, User 1 sets the value as 100, then User 2 sets the value as 200. after that user 1 invokes the Get Value button. What will he see as the value?
The user will see 200 afterwards.