What methods are available to stop multiple postbacks of a form in ASP.NET MVC?

后端 未结 6 1472
后悔当初
后悔当初 2020-12-12 19:48

A common web problem is where a user clicks the submit button of a form multiple times so the server processes the form more than once. This can also happen when a user hit

6条回答
  •  粉色の甜心
    2020-12-12 20:19

    This really isn't MVC specific, but the pattern we follow on our web pages is that actions are performed with AJAX calls, rather than full page POSTs. So navigating to a url never performs an action, just displays the form. The AJAX call won't be in the history

提交回复
热议问题