Avoiding Duplicate form submission in Asp.net MVC by clicking submit twice

前端 未结 6 1690
情书的邮戳
情书的邮戳 2021-01-30 22:30

I am rendering a form in Asp.net MVC with a submit button. The page redirects after successful record addition into the database. Following is the code :-

[HttpP         


        
6条回答
  •  逝去的感伤
    2021-01-30 22:54

    Disabling the button is fine via JavaScript but what if the user has it disabled or they bypass it? If you use client side security then back it up with server side. I would use the PRG pattern here.

提交回复
热议问题