if (this.IsPostBack == false) { if (Session.Count == 0) { //this will directs the user back to the login page if the user clicks
//back button at the login page.
Page.Response.Redirect("LoginPage.aspx");
} else { lblFirst.Text = Session["FirstName"].ToString(); lblLast.Text = Session["LastName"].ToString(); } }