To set some value in Session,
you just have to write:>
Session["anyName"]="any Value";
By doing this, you will store the string "any Value" in your Session variable named "anyName".
When you want to retrieve that value, you just have to write:>
string variable="";
if (Session["anyName"]!=null)
variable = Session["anyName"].ToString();
To Login, you check whether :>
if(Session["anyName"]!=null)
{.
.
.
.
...
}else
Response.Redirect("Login.aspx");
And so.on...