ASP.NET AJAX.BeginForm sends multiple requests

前端 未结 3 1032
广开言路
广开言路 2020-12-15 22:04

Im relatevely new with Asp.net MVC3,

I have a form handled with Ajax, like this:

@using (Ajax.BeginForm(\"dtjson\", new AjaxOptions { HttpMethod = \"Post\"

3条回答
  •  渐次进展
    2020-12-15 22:22

    You have added jquery.unobtrusive-ajax.js three times. It had happened to me as well.

    Check in bundle config "~/ui/js/jquery.unobtrusive.*". the * is wildcard to match both minified or un-minified version. As your solution contains both of the files, it is adding "jquery.unobtrusive-ajax.js" and "jquery.unobtrusive-ajax.min.js". Again in your view page or layout page, you have added jquery.unobtrusive-ajax.js/jquery.unobtrusive-ajax.min.js which is making three times request/post

提交回复
热议问题