protected void CheckoutButton_Click(object sender, EventArgs e) { FormsAuthentication.SignOut(); Session.Abandon(); //Clear Authentication Cookie. HttpCookie cookie1 = new HttpCookie(FormsAuthentication.FormsCookieName, ""); cookie1.Expires = DateTime.Now.AddYears(-1); Response.Cookies.Add(cookie1); // clear session cookie (not necessary for your current problem but i would recommend you do it anyway) HttpCookie cookie2 = new HttpCookie("ASP.NET_SessionId", ""); cookie2.Expires = DateTime.Now.AddYears(-1); Response.Cookies.Add(cookie2); Response.Redirect("~/Checkin.aspx"); //FormsAuthentication.RedirectToLoginPage(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)