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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. How to refresh page only one time

How to refresh page only one time

Scheduled Pinned Locked Moved ASP.NET
helptutorial
6 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.
  • S Offline
    S Offline
    srajasekhar
    wrote on last edited by
    #1

    Hello every body, I am using sessions in my web-based application. After completion of all transactions i want to sign out. When i click sign out and copy the URL and paste it in browser. It is showing the contents of signed-in page. Even I have used "Session.RemoveAll();" in global.asax file when the session ends But If i click refresh and paste the URL it will not allow to show the contents of signed-in page. How to refresh page only one time when i click sign-out. Kindly send me the code... Can any body plz..help me...

    V J Y 3 Replies Last reply
    0
    • S srajasekhar

      Hello every body, I am using sessions in my web-based application. After completion of all transactions i want to sign out. When i click sign out and copy the URL and paste it in browser. It is showing the contents of signed-in page. Even I have used "Session.RemoveAll();" in global.asax file when the session ends But If i click refresh and paste the URL it will not allow to show the contents of signed-in page. How to refresh page only one time when i click sign-out. Kindly send me the code... Can any body plz..help me...

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

      Use Session.Abandon(); Response.Redirect("LoginPage.aspx?action=SessionExpired", true); And on LoginPage.aspx check whether action=SessionExpired if so then redirect to the page which u want or just say window.close(); Hope it helps u??

      1 Reply Last reply
      0
      • S srajasekhar

        Hello every body, I am using sessions in my web-based application. After completion of all transactions i want to sign out. When i click sign out and copy the URL and paste it in browser. It is showing the contents of signed-in page. Even I have used "Session.RemoveAll();" in global.asax file when the session ends But If i click refresh and paste the URL it will not allow to show the contents of signed-in page. How to refresh page only one time when i click sign-out. Kindly send me the code... Can any body plz..help me...

        J Offline
        J Offline
        John ph
        wrote on last edited by
        #3

        Your problem has got nothing to do with the page refresh. Once after signing out if you are still able to access the secured pages then this is due to the Client-side caching enabled. you are viewing the cached page. If you want to disable it then you can write this on the code-behind. so that after the sign-out if you happen to click refresh button or back button, it should probably take you to the login page. Response.Cache.SetCacheability(HttpCacheability.NoCache)

        Regards
         - J O H N -


        S 1 Reply Last reply
        0
        • S srajasekhar

          Hello every body, I am using sessions in my web-based application. After completion of all transactions i want to sign out. When i click sign out and copy the URL and paste it in browser. It is showing the contents of signed-in page. Even I have used "Session.RemoveAll();" in global.asax file when the session ends But If i click refresh and paste the URL it will not allow to show the contents of signed-in page. How to refresh page only one time when i click sign-out. Kindly send me the code... Can any body plz..help me...

          Y Offline
          Y Offline
          yamuna_sutherland
          wrote on last edited by
          #4

          Try ajax in ur project it may rectify that problem.

          1 Reply Last reply
          0
          • J John ph

            Your problem has got nothing to do with the page refresh. Once after signing out if you are still able to access the secured pages then this is due to the Client-side caching enabled. you are viewing the cached page. If you want to disable it then you can write this on the code-behind. so that after the sign-out if you happen to click refresh button or back button, it should probably take you to the login page. Response.Cache.SetCacheability(HttpCacheability.NoCache)

            Regards
             - J O H N -


            S Offline
            S Offline
            srajasekhar
            wrote on last edited by
            #5

            Thank you JoHn... Its Working...

            J 1 Reply Last reply
            0
            • S srajasekhar

              Thank you JoHn... Its Working...

              J Offline
              J Offline
              John ph
              wrote on last edited by
              #6

              srajasekhar wrote:

              Thank you JoHn... Its Working...

              You are most Welcome.

              Regards
               - J O H N -


              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