completely clearing form fields when reloading

Results 1 to 2 of 2

Thread: completely clearing form fields when reloading

  1. #1
    Join Date
    Dec 1969

    Default completely clearing form fields when reloading

    Sorry about this i&#039;m a bit of a newbie, and kinda teaching myself how to use ASP<BR>I have a page which a user fills out some info, and clicks on an add button which then adds the data to a database. This part works fine, and after adding, the form posts, and its action is to reload the page. This clears all the fields which I want, but if you click the &#039;Refresh&#039; button on the browser, it adds another line of data into the database consisting of the<BR>previously entered data. How can I completely clear these form fields on refresh?<BR><BR>Many thanks in advance<BR><BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default posting when ADDing records

    Sounds like if you are posting to the same page. Change this functionality so that you post to another page and redirect back to your add page. This will prevent another insert since the opertaion is not on your add page.<BR><BR>You can also post the form to another page, redirect to a thankyou page or something and link it back to your add form<BR><BR>Just remember not to have your add form perform the actual insert to the DB.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts