Newbie question about session

Discussion in 'ASP .Net' started by momo, May 12, 2006.

  1. momo

    momo Guest

    Hi Guys!

    I have a site that allows users to log in and out based and uses session to
    access every page. My problem is when a user logout and click the back
    button in the browser it allows them to go back and view the content that
    they were in before but can not make any new request to the server without
    logging back in. How can I make that page redirect them to them login page.
    I have tried this
    <%@ OutputCache Duration="0" Location="None" VaryByParam="none" %>
    in my code and it does not work. Please help

    Momo
    momo, May 12, 2006
    #1
    1. Advertising

  2. momo

    sloan Guest

    When the user logs out.
    You can redirect them to a page.
    And you can "disable" the back button for that page.

    You can accomplish this with

    if(history.go(-1))
    history.go(0);

    or
    In Body onload use "history.forword(1)". Then it wont allow user to go
    back.

    You'll have to experiment a little, I'm writing this from memory.



    "momo" <> wrote in message
    news:...
    > Hi Guys!
    >
    > I have a site that allows users to log in and out based and uses session

    to
    > access every page. My problem is when a user logout and click the back
    > button in the browser it allows them to go back and view the content that
    > they were in before but can not make any new request to the server without
    > logging back in. How can I make that page redirect them to them login

    page.
    > I have tried this
    > <%@ OutputCache Duration="0" Location="None" VaryByParam="none" %>
    > in my code and it does not work. Please help
    >
    > Momo
    >
    >
    >
    sloan, May 12, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matt C.

    Newbie question: session state:

    Matt C., Jul 22, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    299
    Kevin Spencer
    Jul 23, 2003
  2. Jeff Smythe
    Replies:
    3
    Views:
    1,229
    Jeff Smythe
    Jan 2, 2004
  3. =?Utf-8?B?Um9iSEs=?=
    Replies:
    4
    Views:
    5,254
    =?Utf-8?B?Um9iSEs=?=
    Apr 11, 2007
  4. Jazzis
    Replies:
    2
    Views:
    234
    Jazzis
    Sep 23, 2003
  5. Jerry C.
    Replies:
    8
    Views:
    214
    Uri Guttman
    Nov 23, 2003
Loading...

Share This Page