logout problem
-
hi, i'm facing a problem in my logout section. even after logout user can go back to the previous page by clicking browsers back button. i'm using code like this.... its working in Internet Explorer but not working in any other browsers. plz help me.. protected void Page_Load(object sender, EventArgs e) { if (Session["sessionId"] != null) { string name1 = Session["sessionId"].ToString(); } else Response.Redirect("Login.aspx"); Response.Buffer=true; Response.ExpiresAbsolute= DateTime.Now.AddDays(-1); Response.Expires=-1500; Response.CacheControl="no-cache"; } protected void LogOut_Click(object sender, EventArgs e) { Session["sessionId"] = null; Response.Redirect("Login.aspx"); }
-
hi, i'm facing a problem in my logout section. even after logout user can go back to the previous page by clicking browsers back button. i'm using code like this.... its working in Internet Explorer but not working in any other browsers. plz help me.. protected void Page_Load(object sender, EventArgs e) { if (Session["sessionId"] != null) { string name1 = Session["sessionId"].ToString(); } else Response.Redirect("Login.aspx"); Response.Buffer=true; Response.ExpiresAbsolute= DateTime.Now.AddDays(-1); Response.Expires=-1500; Response.CacheControl="no-cache"; } protected void LogOut_Click(object sender, EventArgs e) { Session["sessionId"] = null; Response.Redirect("Login.aspx"); }
-
can plz give me any sample codes for that
-
hi, i'm facing a problem in my logout section. even after logout user can go back to the previous page by clicking browsers back button. i'm using code like this.... its working in Internet Explorer but not working in any other browsers. plz help me.. protected void Page_Load(object sender, EventArgs e) { if (Session["sessionId"] != null) { string name1 = Session["sessionId"].ToString(); } else Response.Redirect("Login.aspx"); Response.Buffer=true; Response.ExpiresAbsolute= DateTime.Now.AddDays(-1); Response.Expires=-1500; Response.CacheControl="no-cache"; } protected void LogOut_Click(object sender, EventArgs e) { Session["sessionId"] = null; Response.Redirect("Login.aspx"); }
mukesh.mr03 wrote:
protected void LogOut_Click(object sender, EventArgs e) { Session["sessionId"] = null; Response.Redirect("Login.aspx"); }
use
Session.Abandon
while logoutBest Regards ----------------- Abhijit Jana View My CodeProject Articles "Success is Journey it's not a destination"
-
can plz give me any sample codes for that
Check this one http://www.codeproject.com/asp/user_logtime.asp[^]
Best Regards ----------------- Abhijit Jana View My CodeProject Articles "Success is Journey it's not a destination"
-
can plz give me any sample codes for that
-
mukesh.mr03 wrote:
protected void LogOut_Click(object sender, EventArgs e) { Session["sessionId"] = null; Response.Redirect("Login.aspx"); }
use
Session.Abandon
while logoutBest Regards ----------------- Abhijit Jana View My CodeProject Articles "Success is Journey it's not a destination"
I think the problem is more complicated than just clearing the cache and using session.abandon. I was facing a kind of this problem: click there to see the solution I came up with: http://www.codeproject.com/useritems/go\_back\_refresh\_pages.asp hope it helps!
Just Relax And Keep It Simple.
-
I think the problem is more complicated than just clearing the cache and using session.abandon. I was facing a kind of this problem: click there to see the solution I came up with: http://www.codeproject.com/useritems/go\_back\_refresh\_pages.asp hope it helps!
Just Relax And Keep It Simple.
:omg: This link Redirect to a wrong page :wtf: can u kindly rechack the link :) Thanks in advance :rose:
Best Regards ----------------- Abhijit Jana View My CodeProject Articles "Success is Journey it's not a destination"
-
:omg: This link Redirect to a wrong page :wtf: can u kindly rechack the link :) Thanks in advance :rose:
Best Regards ----------------- Abhijit Jana View My CodeProject Articles "Success is Journey it's not a destination"
this is the link: http://www.codeproject.com/useritems/go\_back\_refresh\_pages.asp enjoy and hope it helps!
Just Relax And Keep It Simple.