So want to know the behavior of the static variable in Asp.Net with C#.
are static variable equal to global variable which is accessible to all user? If it is set by user A to true can user B get that value as True or it has different instance of the variable.
The behavior is like that only if your run your site under one working process on your pool.
If your pool have more than one working process, then each process have their static values, and is unknown to you what process is given to each request, to each user. And process together they are not communicate.
So let say that you have a pool with 4 working process.
UserA ask for a page, Process 1 is replay and set a static value to A.
UserB ask for a page, Process 1 is replay and the static value is A.
UserA ask for a page, Process 2 is replay and the static value is not set.
and so on.
More on the subject:
Lifetime of ASP.NET Static Variable
Where are static variables stored in asp.net aspx page
Using static variables instead of Application state in ASP.NET
Static methods on ASP.NET web sites
Asp.net static object appears sometimes as non global