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. Disabling the browser back button

Disabling the browser back button

Scheduled Pinned Locked Moved ASP.NET
tutorial
8 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.
  • M Offline
    M Offline
    Mr Sam
    wrote on last edited by
    #1

    Hi all... I want to disable the browser back button. Is there anyway possible . I heard of some meta tags but dont know how to use them . Can anyone tell me a perfect solution to this that I can just place in the master page and it will do all the work. Waiting in anticipation Sam

    Bye

    B B A 3 Replies Last reply
    0
    • M Mr Sam

      Hi all... I want to disable the browser back button. Is there anyway possible . I heard of some meta tags but dont know how to use them . Can anyone tell me a perfect solution to this that I can just place in the master page and it will do all the work. Waiting in anticipation Sam

      Bye

      B Offline
      B Offline
      BasharatAli
      wrote on last edited by
      #2

      There are no straight forward way of disabling back button. You can try appending history.forward() in the firstline of the page as a workaround so that when the page is back pressed, then, the browser would push it forward. If it helps then rate me

      BasharatAli Internee METESYS Lahore Pakistan

      M 1 Reply Last reply
      0
      • B BasharatAli

        There are no straight forward way of disabling back button. You can try appending history.forward() in the firstline of the page as a workaround so that when the page is back pressed, then, the browser would push it forward. If it helps then rate me

        BasharatAli Internee METESYS Lahore Pakistan

        M Offline
        M Offline
        Mr Sam
        wrote on last edited by
        #3

        i have tried this method as well but once i get the postback on the page and then click the back button, despite all the correct url the page is directed to cannot find server. I have tried this as well. javascript:window.history.forward(1); Now i also tried this but of no use. :sigh:

        Bye

        1 Reply Last reply
        0
        • M Mr Sam

          Hi all... I want to disable the browser back button. Is there anyway possible . I heard of some meta tags but dont know how to use them . Can anyone tell me a perfect solution to this that I can just place in the master page and it will do all the work. Waiting in anticipation Sam

          Bye

          B Offline
          B Offline
          Blue_Boy
          wrote on last edited by
          #4

          Disable browser back button[^]


          I Love SQL

          M 1 Reply Last reply
          0
          • B Blue_Boy

            Disable browser back button[^]


            I Love SQL

            M Offline
            M Offline
            Mr Sam
            wrote on last edited by
            #5

            dear blue boy i knw how to google So, plz give me the answer if u knw it thx

            Bye

            B 1 Reply Last reply
            0
            • M Mr Sam

              dear blue boy i knw how to google So, plz give me the answer if u knw it thx

              Bye

              B Offline
              B Offline
              Blue_Boy
              wrote on last edited by
              #6

              Mr.Sam wrote:

              knw how to google

              Why you can't figure out then?!


              I Love SQL

              M 1 Reply Last reply
              0
              • B Blue_Boy

                Mr.Sam wrote:

                knw how to google

                Why you can't figure out then?!


                I Love SQL

                M Offline
                M Offline
                Mr Sam
                wrote on last edited by
                #7

                can anybody give me the answer... plzzz

                Bye

                1 Reply Last reply
                0
                • M Mr Sam

                  Hi all... I want to disable the browser back button. Is there anyway possible . I heard of some meta tags but dont know how to use them . Can anyone tell me a perfect solution to this that I can just place in the master page and it will do all the work. Waiting in anticipation Sam

                  Bye

                  A Offline
                  A Offline
                  Abisodun
                  wrote on last edited by
                  #8

                  You shouldn't be able to as far as I know. One practice is to prevent the page from caching i.e. In your aspx page: <% Response.CacheControl = "no-cache"; Response.AppendHeader("Pragma", "no-cache"); Response.Expires = -1; Response.Cache.SetNoStore(); %> Some combination of these commands should stop caching. Then use the pageload event to redirect as necessary. Good Luck.

                  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