I would like to have kind of static variable but isolated for each user session so is static variable in asp.net common to all users ?
If yes is there an easy to emulate what I want without using user session explicitly ? I cannot use Viewstate either as I'm using MVC (or am I mistaken ?)
Sumit Kesarwani
20-Nov-2014A static variable will be common for all sessions yes.
If you want to keep per-user-session data you have three options:
· Use built in Session handling.
· Set a cookie.
· Pass the data as a hidden form field that is posted to the server (works for places where you have a form anyway).