问题描述:

I am trying to save the value in a session and then on page refresh, I am trying to use that value. But every time, it goes inside the loop .

I am using HttpContext.Current.Session because my class is inheriting from HTMLTable.

if (HttpContext.Current.Session["Id"] == null)

{

HttpContext.Current.Session["Id"] = "2";

}

string a = HttpContext.Current.Session["Id"].ToString(); //I get 2, WORKS HERE

相关阅读:
Top