ASP .NET MVC issue with Ajax.BeginForm replaces all view content with JSON data

后端 未结 2 579
无人及你
无人及你 2021-01-25 21:39

I have created a sample ASP.NET MVC website in VS 2015 and in a view i am using the extension Ajax.BeginForm to post login credentials to controller, and on OnSuccess callback i

2条回答
  •  孤独总比滥情好
    2021-01-25 22:22

    If your displaying only the json returned by your LogIn() method, then its because you have not included jquery.unobtrusive-ajax.js file in your view. As a result, Ajax.BeginForm() falls back to making a normal submit

提交回复
热议问题