Session.Abandon()
protected void btnLogout_Click(object sender, EventArgs e) { //clear session variables Session["strIcaNo"] = ""; Session["strEmail"] = ""; Session["strName"] = ""; //redirect to login page Response.Redirect("Login.aspx"); }
Session.Add("username",HttpContext.Current.User.Identity.Name); Session.Remove("username");
protected void LogoutButton1_Click(object sender, EventArgs e) { Session.Abandon(); Session.Remove("Username"); Session.Remove("Password"); Response.Redirect("Login.aspx"); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)