Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. How to use session state?

How to use session state?

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netdesigntutorialquestion
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Segal
    wrote on last edited by
    #1

    I'm pretty new to use ASP.NET for web page design. I worked out a page in which it got user name and password, etc. When it passed the validation, it goes into the content page, and when the sign out button is pressed, it went back to the sign in page again. Now, if I press the back button from IE after signing out, it can still goes back to the content page. So, how to use the session data to prevent this happened? Many thanks!

    V R 2 Replies Last reply
    0
    • S Segal

      I'm pretty new to use ASP.NET for web page design. I worked out a page in which it got user name and password, etc. When it passed the validation, it goes into the content page, and when the sign out button is pressed, it went back to the sign in page again. Now, if I press the back button from IE after signing out, it can still goes back to the content page. So, how to use the session data to prevent this happened? Many thanks!

      V Offline
      V Offline
      Vasudevan Deepak Kumar
      wrote on last edited by
      #2

      Hi Segal, Call Session.Abandon() in logout button click to destroy session values. Deepak Kumar Vasudevan http://deepak.portland.co.uk/

      1 Reply Last reply
      0
      • S Segal

        I'm pretty new to use ASP.NET for web page design. I worked out a page in which it got user name and password, etc. When it passed the validation, it goes into the content page, and when the sign out button is pressed, it went back to the sign in page again. Now, if I press the back button from IE after signing out, it can still goes back to the content page. So, how to use the session data to prevent this happened? Many thanks!

        R Offline
        R Offline
        Raymond Ooi
        wrote on last edited by
        #3

        If you prevent the browser from caching pages, the user can't retrieve the page via the Back button. Response.Cache.SetCacheability(HttpCacheability.NoCache);

        S 1 Reply Last reply
        0
        • R Raymond Ooi

          If you prevent the browser from caching pages, the user can't retrieve the page via the Back button. Response.Cache.SetCacheability(HttpCacheability.NoCache);

          S Offline
          S Offline
          Segal
          wrote on last edited by
          #4

          Thanks for your reply! I just added it into my logout click function, but the problem is still there. Any ideas?

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups