Static members global to client apps
Thanks in advance for any help. I'm using asp .net with c#.
I'm finding the value in a static member in a webform class is showing up in every client (browser instance). This is very dangerous. I thought a static would not be global to every webapp instance on every machine accessing the server. Ex:
public class WebFormX : System.Web.UI.Page
{
protected static string sCity;
}
// if client instance 1 sets sCity="miami" then all other client instances get sCity="miami" on their next refresh. I realize we're dealing with server variables but there must be a way to keep static values unique to each session. - How?
Thanks.
|