Assign and Retrieve Session
//Assign a value to the myvariable session variable.
Session["myvariable"] = "somevalue";
//Retrieve the value of the myvariable session variable.
string myString;
if (Session["myvariable"] != null)
myString = (string)Session["myvariable"];