Other Options for static variables
-
Hello,, Good Morning .... I am facing the following problem .... I have some static variables on my aspx page .... because i have to use them after postback on same page.... but this static variables will be same for across the session so all user get same value ... at a time but i want this variables user depandent ... i.e. every user has its own static variable ... help ... Thanking you ...
-
Hello,, Good Morning .... I am facing the following problem .... I have some static variables on my aspx page .... because i have to use them after postback on same page.... but this static variables will be same for across the session so all user get same value ... at a time but i want this variables user depandent ... i.e. every user has its own static variable ... help ... Thanking you ...
you can use session, please check the bellow code
public static string SomeProperty { get { return HttpContext.Current.Session["SomeProperty"].ToString(); } set { HttpContext.Current.Session["SomeProperty"] = value; } }
Manikandan.net [Coding is life]