Form is submitted twice to mvc
1 answer
I suspect you have jquery-unobtrusive-ajax.js that gets included multiple times in the page, in the layout of the layout, and also in the child view, causing the form to publish multiple times.
in this case it is included twice, so the form is submitted twice. you have to make sure it is only enabled once, enable it _Layout.cshtml
and remove it from all child views.
These scripts are included in the view by default _Layout.cshtml
, so if you re-include them in the child view it will result in a double form post
+12
source to share