Logout - Need Help

Results 1 to 4 of 4

Thread: Logout - Need Help

  1. #1
    Join Date
    Dec 1969
    Posts
    731

    Default Logout - Need Help

    Hi, How do i logout from my ASP application. I have an option "Logout". When used clicks "Logout" i release all the objects and abandon the session and redirect the used to my default page. But how do i prevent the user from clicking the browser "back" button and go to my previously visited application page?

  2. #2
    Join Date
    Dec 1969
    Posts
    29

    Default RE: Logout - Need Help

    I don&#039t like using session variables at all! But this is one method for what you are trying to do.<BR>When the user first logins create a session variable...<BR>Session("LoginStatus") = "LoggedIn"<BR><BR>on each page you would put at the top<BR>If Not Session("LoginStatus") = "LoggedIn" Then<BR> Response.redirect("Error.asp?error=NotLoggedIn")<B R>End If<BR><BR>and on your page redirected page after logging out put<BR>Session("LoginStatus") = "LoggedOut"<BR><BR>That way if they hit the back button the session level variable<BR>contains "LoggedOut" and your asp page will redirect them to the <BR>error page<BR>

  3. #3
    Ollle Guest

    Default RE: Logout - Need Help

    Yeah.

  4. #4
    Join Date
    Dec 1969
    Posts
    866

    Default RE: Logout - Need Help

    This would work if you hit the back button and then refresh button. When you hit back button the page would not auto refresh. You can set the page expires in head to force refresh, but that only work with netscape not IE. Does anyone know how to do it in IE.<BR><BR>Thanks,<BR><BR>SAM


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •