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 disable back Button in IE using asp.net

how to disable back Button in IE using asp.net

Scheduled Pinned Locked Moved ASP.NET
csharpjavascriptasp-nettutorialquestion
3 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.
  • D Offline
    D Offline
    deepthy p m 0
    wrote on last edited by
    #1

    I use the following code to disable back in IE In javascript i use window.history.forward(1); ] and on code side protected void Page_Init(object sender, EventArgs e) { Response.Cache.SetCacheability(HttpCacheability.NoCache); } protected void Page_Load(object sender, EventArgs e) { Response.AddHeader("pragma", "no-cache"); Response.Expires = -1; } But When i move from login page to firstpage it should not retun to login page when the back button is clicked. right now its returning to login page.How can i avoid that.

    P J 2 Replies Last reply
    0
    • D deepthy p m 0

      I use the following code to disable back in IE In javascript i use window.history.forward(1); ] and on code side protected void Page_Init(object sender, EventArgs e) { Response.Cache.SetCacheability(HttpCacheability.NoCache); } protected void Page_Load(object sender, EventArgs e) { Response.AddHeader("pragma", "no-cache"); Response.Expires = -1; } But When i move from login page to firstpage it should not retun to login page when the back button is clicked. right now its returning to login page.How can i avoid that.

      P Offline
      P Offline
      Paddy Boyd
      wrote on last edited by
      #2

      Good grief - did you search in codeproject prior to posting. This has to be the most asked question in this forum. Scroll down a few days, it'll be here somewhere... In fact, here, it's on the next page: http://www.codeproject.com/script/Forums/View.aspx?fid=12076&msg=2896781[^]

      1 Reply Last reply
      0
      • D deepthy p m 0

        I use the following code to disable back in IE In javascript i use window.history.forward(1); ] and on code side protected void Page_Init(object sender, EventArgs e) { Response.Cache.SetCacheability(HttpCacheability.NoCache); } protected void Page_Load(object sender, EventArgs e) { Response.AddHeader("pragma", "no-cache"); Response.Expires = -1; } But When i move from login page to firstpage it should not retun to login page when the back button is clicked. right now its returning to login page.How can i avoid that.

        J Offline
        J Offline
        josh417
        wrote on last edited by
        #3

        Hi,Try to go through the following link. http://dotnetslackers.com/articles/ajax/HandlingTheBackButtonFromServerCode.aspx hope it helps.

        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