Session.Clear();
Response.Buffer = true;
Response.ExpiresAbsolute = DateTime.Now.AddDays(-1D);
Response.Expires = -1500;
Response.CacheControl = "no-cache";
//----- Second Technique : To Stop Caching of Secure Pages.
Response.Cache.SetCacheability(HttpCacheability.NoCache);
FormsAuthentication.SignOut();
if (Session["UserName"] == null)
{
Response.Redirect("login.aspx");
}
Session.Clear();
deepak jois 0 Newbie Poster
AleMonteiro 238 Can I pick my title?
JorgeM 958 Problem Solver Team Colleague Featured Poster
hericles 289 Master Poster Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.