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. stop back option

stop back option

Scheduled Pinned Locked Moved ASP.NET
csharpasp-net
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.
  • V Offline
    V Offline
    vikramsc
    wrote on last edited by
    #1

    hi i have one web application in asp.net after logout if i click on back button of browser . i will inter in my application. but i want that when i click on back button i will go on logout page. how it will possible. it means i want to stop back button.on click of back button my defult form will be display. thanks

    vikram

    C P B 3 Replies Last reply
    0
    • V vikramsc

      hi i have one web application in asp.net after logout if i click on back button of browser . i will inter in my application. but i want that when i click on back button i will go on logout page. how it will possible. it means i want to stop back button.on click of back button my defult form will be display. thanks

      vikram

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      By writing a proper membership system ? You should log people out, generally by clearing a session variable. Therefore, if they are logged out, the page should redirect to the login page.

      Christian Graus Driven to the arms of OSX by Vista.

      V 1 Reply Last reply
      0
      • C Christian Graus

        By writing a proper membership system ? You should log people out, generally by clearing a session variable. Therefore, if they are logged out, the page should redirect to the login page.

        Christian Graus Driven to the arms of OSX by Vista.

        V Offline
        V Offline
        vikramsc
        wrote on last edited by
        #3

        Response.ExpiresAbsolute = DateTime.Now.AddDays(-1D) Response.Expires = -1500 Response.CacheControl = "no-cache" If Session("UserName") = "" Then Response.Redirect("login.aspx")

        uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu

        C 1 Reply Last reply
        0
        • V vikramsc

          Response.ExpiresAbsolute = DateTime.Now.AddDays(-1D) Response.Expires = -1500 Response.CacheControl = "no-cache" If Session("UserName") = "" Then Response.Redirect("login.aspx")

          uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          Why are you using an empty string and not null ?

          Christian Graus Driven to the arms of OSX by Vista.

          1 Reply Last reply
          0
          • V vikramsc

            hi i have one web application in asp.net after logout if i click on back button of browser . i will inter in my application. but i want that when i click on back button i will go on logout page. how it will possible. it means i want to stop back button.on click of back button my defult form will be display. thanks

            vikram

            P Offline
            P Offline
            pinna_hari
            wrote on last edited by
            #5

            hi, in logout click event you have to write code for killing the session. and in global.asax page you have to redirect the page to login page if the session["username"]="". Or write below code in page load Response.Buffer = True Response.ExpiresAbsolute = Now().Subtract(New TimeSpan(1, 0, 0, 0)) Response.Expires = 0 Response.CacheControl = "no-cache"

            Pinna

            1 Reply Last reply
            0
            • V vikramsc

              hi i have one web application in asp.net after logout if i click on back button of browser . i will inter in my application. but i want that when i click on back button i will go on logout page. how it will possible. it means i want to stop back button.on click of back button my defult form will be display. thanks

              vikram

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

              You can also clear the history :)

              Cheers!! Brij

              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