The name ‘Session’ does not exist in the current context error

Error occurs as compiler does not know which ‘Session’ class you are referring to.

Solution:

//read from session
string value = (string)HttpContext.Current.Session["key"];

//write to session
HttpContext.Current.Session["key"] = "value";