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. Saving Form-data to Database

Saving Form-data to Database

Scheduled Pinned Locked Moved Web Development
databasequestion
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.
  • K Offline
    K Offline
    Knappen
    wrote on last edited by
    #1

    Hello I’m perhaps a bit old fashion when it comes to ASP. I try to build a Form populated whit Database data (from a Stored Procedure) and when I click the “save” button the data will be saved to the database thro a Stored Procedure. But it won’t work, it looks as if the load event is fired before the button.click?????

    Richard DeemingR 1 Reply Last reply
    0
    • K Knappen

      Hello I’m perhaps a bit old fashion when it comes to ASP. I try to build a Form populated whit Database data (from a Stored Procedure) and when I click the “save” button the data will be saved to the database thro a Stored Procedure. But it won’t work, it looks as if the load event is fired before the button.click?????

      Richard DeemingR Offline
      Richard DeemingR Offline
      Richard Deeming
      wrote on last edited by
      #2

      That's correct. In the Page_Load event, check the Page.IsPostBack property. If the property is true, the form has been posted back and you don't need to populate it.

      "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

      K 1 Reply Last reply
      0
      • Richard DeemingR Richard Deeming

        That's correct. In the Page_Load event, check the Page.IsPostBack property. If the property is true, the form has been posted back and you don't need to populate it.

        K Offline
        K Offline
        Knappen
        wrote on last edited by
        #3

        That's not what you would have figured if you are a old ASP-programmer like me. But It's kind of cool that I only hav to populate it ones. Thanks

        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