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. Page Refresh Problem

Page Refresh Problem

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netdatabasehelp
3 Posts 2 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
    MalikRizwan
    wrote on last edited by
    #1

    I am using ASP.NET first time. i dont know much about dealing all this stuff. Problem i am facing is whenever i press F5 from my keyboard a codebehind my USERCONTROL's Submit button is automatically fired and it saves the previous data again into DB (i am astonished from where it gets previous data as i am making the fields empty after insert**

    R A M

    **

    G 1 Reply Last reply
    0
    • M MalikRizwan

      I am using ASP.NET first time. i dont know much about dealing all this stuff. Problem i am facing is whenever i press F5 from my keyboard a codebehind my USERCONTROL's Submit button is automatically fired and it saves the previous data again into DB (i am astonished from where it gets previous data as i am making the fields empty after insert**

      R A M

      **

      G Offline
      G Offline
      Guffa
      wrote on last edited by
      #2

      When you press F5, the browser resends the last request to the server, and the request contains the form data from when the request was originally sent. You can avoid this by making a redirect after you have saved the data. That will make the browser request the page that you specify, so the last request will be that one, not the request containing the form data. --- b { font-weight: normal; }

      M 1 Reply Last reply
      0
      • G Guffa

        When you press F5, the browser resends the last request to the server, and the request contains the form data from when the request was originally sent. You can avoid this by making a redirect after you have saved the data. That will make the browser request the page that you specify, so the last request will be that one, not the request containing the form data. --- b { font-weight: normal; }

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

        Thanx alot ... I got it now ... infact there are many more solution i have read in an article... like viewstate..etc... Thanx alot anyways**

        R A M

        **

        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