I have a ajax form when its submit button is clicked It is submitted twice means that control comes in controller action method twice, I am unable to find solution.
I suspect you have jquery-unobtrusive-ajax.js included multiple times on page, in master layout and also in the child view which is causing the form to be posted multiple times.
in this case it is included two times, so form is posting two times. you have to make sure that it is included only once, include it _Layout.cshtml
and remove from all child views.
These scripts are by default included in _layout.cshtml
view so if you include them again in child view it will cause it to post form twice
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With