title: Prevent Double Submit / Post on ASP.NET MVC page
body: <p>I am hoping for some feedback about the method I intend to use for preventing duplicate records in an ASP.NET MVC 4 application, and the knock on effects I have not though of for the users experience.</p>
  
  <p>The web form has six input fields and a save button (as well as a cancel button), Users can take up to 10 minutes filling in the form.</p>
  
  <p>Once the fields are submitted via a post the page is redirected on success / failure to a different page, after the data is recorded in a database table using a new Guid as the primary key.</p>
  
  <p>To stop the users pressing the save button many times, but allowing the browser to repost the request on a closed connection I intend to provide the Guid for the new records primary key as a hidden input field when the form is rendered.</p>
  
  <p>If the repost happens, or the user presses save multiple times, the database server will reject the second post of the record because of a duplicate key, which I can check for and cope with server side.</p>
  
  <p>But does this create bigger problems for me?</p>