Page seems to be remembering HttpSessionState

Discussion in 'ASP .Net Building Controls' started by Nathan Sokalski, Jan 15, 2007.

  1. I have a page that determines some of what to display based on
    HttpSessionState. When I go to it the first time, it displays everything the
    way I would expect. Then I go to another page on my site (by clicking links,
    so I am still using the same browser window), which calls Session.Abandon()
    to start a new Session. Then when I click a link to go to the page that uses
    the HttpSessionState, it still uses the values that were in it when I left.
    If I then click the browser's Refresh button, it uses the values from the
    new Session. What do I need to do to make the user not need to click the
    Refresh button? Thanks.
    --
    Nathan Sokalski

    http://www.nathansokalski.com/
    Nathan Sokalski, Jan 15, 2007
    #1
    1. Advertising

  2. Nathan Sokalski

    Joerg Jooss Guest

    Thus wrote Nathan,

    > I have a page that determines some of what to display based on
    > HttpSessionState. When I go to it the first time, it displays
    > everything the way I would expect. Then I go to another page on my
    > site (by clicking links, so I am still using the same browser window),
    > which calls Session.Abandon() to start a new Session. Then when I
    > click a link to go to the page that uses the HttpSessionState, it
    > still uses the values that were in it when I left. If I then click the
    > browser's Refresh button, it uses the values from the new Session.
    > What do I need to do to make the user not need to click the Refresh
    > button? Thanks.


    Mark the page uncacheable. Either set the page direction <%@ OutputCache
    Location="None" %> or call Response.Cache.SetCacheability(HttpCacheability.NoCache).

    Cheers,
    --
    Joerg Jooss
    Joerg Jooss, Jan 19, 2007
    #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. =?Utf-8?B?TmV3Ymll?=

    HttpSessionState.Abandon() from ASP Enviroment?

    =?Utf-8?B?TmV3Ymll?=, May 31, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    540
    Nicole Calinoiu
    May 31, 2004
  2. Gilles
    Replies:
    3
    Views:
    2,603
    =?Utf-8?B?Lk5ldE5ld2JpZQ==?=
    Sep 30, 2004
  3. Mike
    Replies:
    5
    Views:
    914
    Scott Allen
    Oct 19, 2004
  4. Nathan Sokalski

    Page seems to be remembering HttpSessionState

    Nathan Sokalski, Jan 15, 2007, in forum: ASP .Net
    Replies:
    2
    Views:
    366
    Joerg Jooss
    Jan 19, 2007
  5. Nathan Sokalski

    Page seems to be remembering HttpSessionState

    Nathan Sokalski, Jan 15, 2007, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    106
    Joerg Jooss
    Jan 19, 2007
Loading...

Share This Page