The usual approach is to disable the submit button immediately after clicking it.
Something like this with jQuery should work:
<script type="text/javascript">
$("#myform").submit(function()
{ $("#submit-button").attr("disabled", "disabled"); });
</script>
Now after reading closely your question and seeing that you use ASP.NET MVC....
The double post is probably caused because users refresh the page after posting it. If you simply return a view from your post action:
[AcceptVerbs (HttpVerbs.Pos)]
ActionResult ProcessUserPost ()
{
/*...*/
return View ();
}
Then the browser will attempt to recreate the page by performing the same steps, meaning submitting the remembered form again. Some browsers will display a warning message (FireFox), the others will just do it quietly (looking at Opera). In order to avoid this you need to assure the page the user is getting is the result of a GET request not POST.
Basically, you need to perform a redirect instead of returning a view. This will instruct the browser to fetch a page again.
[AcceptVerbs (HttpVerbs.Pos)]
ActionResult ProcessUserPost ()
{
/*...*/
return RedirectToAction ("DisplayTheForm");
}
This way refreshing the page won't cause a new POST request being sent.
Of course, this will not prevent your users clicking the back button to return to the form page to submit it again. But that situation should be handled in your business logic, check for double submission of the same order by the same user of whatever it is that you are doing.