Prevent multiple POST in asp.net mvc application -


how prevent user posting same data action multiple times if keep clicking submit button?

i know in php, there way prevent multiple submission, not see asp.net mvc. there any?

you disable submit button using javascript. example jquery:

$(function() {     $('form').submit(function() {         $('#idofsubmitbutton').attr('disabled', 'disabled');     }); }); 

note might not 100% reliable example user have javascript disabled or worse: have malicious intents , automate http post requests.


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -