Disable razor form submit button when clicked

Capture the click event with javascript and disable the submit button to ensure the form is submitted only once

 

Set a form id in Html.BeginForm()
The javascript to submit the form needs a form id. To assign a form id in the razor Html.BeginForm() helper, use the method overload that accepts four parameters. Pass null for the first two, then the Post action for the third, and the form id for the last parameter.

The button will also need an id. The following is a bootstrap button.
 
@using (Html.BeginForm(null, null, FormMethod.Post, new {id="idMyForm"})) {

  <input type="button" value="My Button" class="btn btn-default" id="idMyBtn" />
}

 
Use javascript to disable the button and then submit the form
Attach a javascript method to the button click to first disable the button, and then submit the form. This way if the user double clicks the button, the second click will be disabled and the form will only be submitted once.
 
<script>

    $(document).ready(function () {

        $('#idMyBtn').on('click',
            function (event) {
                $('#idMyBtn').prop('disabled', true);
                $('#idMyForm').submit();
        });
    });

</script>