if (Request["Logout"] == "1")
{
ltrErrorMsg.Text = "You are successfully logged out !";
Session.Contents.Clear();
Session.Abandon();
FormsAuthentication.SignOut();
HttpCookie cookie = HttpContext.Current.Request.Cookies["Admin"];
if (cookie != null)
{
Request.Cookies["Admin"].Expires = DateTime.Now.AddHours(-1);
Response.Cookies.Add(cookie);
}
}
{
ltrErrorMsg.Text = "You are successfully logged out !";
Session.Contents.Clear();
Session.Abandon();
FormsAuthentication.SignOut();
HttpCookie cookie = HttpContext.Current.Request.Cookies["Admin"];
if (cookie != null)
{
Request.Cookies["Admin"].Expires = DateTime.Now.AddHours(-1);
Response.Cookies.Add(cookie);
}
}