HttpPost action of a controller gets hit twice
问题 Following is the exact scenario in my application. I believe this picture is explaining the issue clearly. please do let me know if you have any questions in understanding the same. The issues is the HttpPost action gets called twice causing two entries getting added in the database. How can I prevent the 2 actions? 回答1: The problem is because you are adding a submit() handler to your form every time you click the button, therefore the second time you submit the form, it'll hit your action