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. Logout and back button problem

Logout and back button problem

Scheduled Pinned Locked Moved ASP.NET
helpasp-netquestion
4 Posts 4 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.
  • V Offline
    V Offline
    Vipin d
    wrote on last edited by
    #1

    Hi frndz, i have one issue relating to loginI have 3 web forms Login page, home,and logout . for authenticating each page we check session value. Wen I login, keep user name in session["user"] and logo out I assign session["user"] ="" in the home page's load event i check if(session["user"] .tostring()=="" || session["user"] ==null) { response.redirect("login.aspx"); } esle { some functions.. } After logout if i press the back button of the browser i can come to home.aspx.it didnt check condition in the load event in the Home page what i do? --

    All I ever wanted is what others have.... CrazySanker

    V B V 3 Replies Last reply
    0
    • V Vipin d

      Hi frndz, i have one issue relating to loginI have 3 web forms Login page, home,and logout . for authenticating each page we check session value. Wen I login, keep user name in session["user"] and logo out I assign session["user"] ="" in the home page's load event i check if(session["user"] .tostring()=="" || session["user"] ==null) { response.redirect("login.aspx"); } esle { some functions.. } After logout if i press the back button of the browser i can come to home.aspx.it didnt check condition in the load event in the Home page what i do? --

      All I ever wanted is what others have.... CrazySanker

      V Offline
      V Offline
      Vsree
      wrote on last edited by
      #2

      hi If you use browser back button, the page_load wont fire, because it just calls window.history.back() meaning that it goes to the last page visited. To avoid this you can have a button in your UI which on clicked goes to the home page and hence the Page_Load of it will fire. ~VSree

      1 Reply Last reply
      0
      • V Vipin d

        Hi frndz, i have one issue relating to loginI have 3 web forms Login page, home,and logout . for authenticating each page we check session value. Wen I login, keep user name in session["user"] and logo out I assign session["user"] ="" in the home page's load event i check if(session["user"] .tostring()=="" || session["user"] ==null) { response.redirect("login.aspx"); } esle { some functions.. } After logout if i press the back button of the browser i can come to home.aspx.it didnt check condition in the load event in the Home page what i do? --

        All I ever wanted is what others have.... CrazySanker

        B Offline
        B Offline
        badgrs
        wrote on last edited by
        #3

        When you hit back in the browser it (usually) doesn't actually reload the page, just uses the cached version. If they then try to do anything from that page it should hopefully deny it.

        1 Reply Last reply
        0
        • V Vipin d

          Hi frndz, i have one issue relating to loginI have 3 web forms Login page, home,and logout . for authenticating each page we check session value. Wen I login, keep user name in session["user"] and logo out I assign session["user"] ="" in the home page's load event i check if(session["user"] .tostring()=="" || session["user"] ==null) { response.redirect("login.aspx"); } esle { some functions.. } After logout if i press the back button of the browser i can come to home.aspx.it didnt check condition in the load event in the Home page what i do? --

          All I ever wanted is what others have.... CrazySanker

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

          About about expiring pages?

          Vasudevan Deepak Kumar Personal Homepage Tech Gossips

          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