title: What is a good method for preventing a user from submitting a form twice?
body: <p>I have a purchase page and I don't want the user to be able to refresh the page and resubmit the form once they get to the 'order complete' page because it automatically sets them up in our system via database values and charges their card via paypal (only want these to happen ONCE)... I have seen some sites that say 'Don't hit refresh or you will get charged twice!' but that is pretty lame to leave it open to possibility, what's a good way to only allow it to be submitted once or prevent them from refreshing, etc?</p>
  
  <p>PS: I saw a few similar questions: <a href="https://stackoverflow.com/questions/1646812/php-stop-a-form-from-being-accidentally-reprocessed-when-back-is-pressed">PHP: Stop a Form from being accidentally reprocessed when Back is pressed</a> and <a href="https://stackoverflow.com/questions/665399/how-do-i-stop-the-back-and-refresh-buttons-from-resubmitting-my-form">How do I stop the Back and Refresh buttons from resubmitting my form?</a> but found no satisfactory answer... an ASP.NET MVC specific answer would be ideal too if there is a mechanism for this.</p>
  
  <p>EDIT: Once they click submit it POSTS to my controller and then the controller does some magic and then returns a view with an order complete message, but if I click refresh on my browser it does the whole 'do you want to resend this form?' that is bad...</p>