How to prevent duplicate form submission in ASP.NET MVC 3?
问题 I have a razor view that renders a html form and it posts to the server. If the form values are right then it gets saved to database. After insertion, I redirect to another view where user can make further changes. Right now the user can hit browser back button and resubmit the form to create another record in db. How do I prevent duplicate submission in my MVC app? 回答1: One solution is to put a hidden "token" field on the form that's generated randomly when the form loads. When you see that