Click to See Complete Forum and Search --> : after logout


bikey
04-07-2006, 11:26 AM
hihi.. i'm doing a website. When user click logout, all sessions will be cleared, and it wil direct to the login page. But when user click on the "Back" button at Standard Buttons, it will go back to the previous page (but actually all sessions already cleared). Is it my IE settings problem? Last time it didnt give me this problem, dont know why now this problem suddenly appear..pls help..thanks!

hytechpro
04-11-2006, 04:29 AM
Hi,

You can go into source code and change the code. if any one enter into BACK button then it will go the previous page. becuase it connect to previous page.

Thanks:
dev

handshakeit
04-11-2006, 05:05 AM
Give some code what r u doing at session timeout

eeccll
04-11-2006, 06:13 AM
this is logout button..

Private Sub LogoutLink_Click(ByVal sender As System.Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles LogoutLink.Click
'update Member last login
cn.ConnectionString = sqlcn
cn.Open()
cm.CommandText = "UPDATE Member SET MemLastLogin = '" & Session("UserLastLogin") & "' WHERE MemID = '" & Session("User") & "' "
cm.Connection = cn
cm.ExecuteNonQuery()
cn.Close()

Session("User") = ""
Response.Redirect("login.aspx")
End Sub

sirpelidor
04-11-2006, 09:01 PM
I too, suffer from this problem for a while, hope this would show you the light from the tunnel:

http://www.codeproject.com/useritems/NoCaching.asp

bikey
04-11-2006, 10:29 PM
thanks for your useful information! It works! ^.^