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. Browser back button

Browser back button

Scheduled Pinned Locked Moved ASP.NET
questiondatabasehelp
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.
  • J Offline
    J Offline
    javierarka
    wrote on last edited by
    #1

    :laugh:I have a label in my page that display an error when it find it. This is what it does. The user enters a value in a text box, It looks in a database and if does not find the value displays a label saying that that value does not exist and to type another value. When the user types a correct value it redirect to another page with the results for that value. When the user hit the back button in the browser the label is disply again saying that the value does not exist, but it does. How can i disable this label after the page is redirected so when the user hit the back button that label is not display ? Thanks:laugh: Javierarka

    A M 2 Replies Last reply
    0
    • J javierarka

      :laugh:I have a label in my page that display an error when it find it. This is what it does. The user enters a value in a text box, It looks in a database and if does not find the value displays a label saying that that value does not exist and to type another value. When the user types a correct value it redirect to another page with the results for that value. When the user hit the back button in the browser the label is disply again saying that the value does not exist, but it does. How can i disable this label after the page is redirected so when the user hit the back button that label is not display ? Thanks:laugh: Javierarka

      A Offline
      A Offline
      alimohammed
      wrote on last edited by
      #2

      Im not sure if it works, though try a javascript function in onload of that page which does history.clear. Search for it on web...

      1 Reply Last reply
      0
      • J javierarka

        :laugh:I have a label in my page that display an error when it find it. This is what it does. The user enters a value in a text box, It looks in a database and if does not find the value displays a label saying that that value does not exist and to type another value. When the user types a correct value it redirect to another page with the results for that value. When the user hit the back button in the browser the label is disply again saying that the value does not exist, but it does. How can i disable this label after the page is redirected so when the user hit the back button that label is not display ? Thanks:laugh: Javierarka

        M Offline
        M Offline
        MoustafaS
        wrote on last edited by
        #3

        Just check if its a post back before writing anything to the label, and before redirecting erase the label's text.

        ------------------------------
        "The Soapbox has been so ..."

        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