Ajax.BeginForm doesn't call onSuccess

后端 未结 4 978
傲寒
傲寒 2021-01-05 20:01

In ASP.NET MVC 3 application I use Ajax.BeginForm to post writed text to controller.

@using (Ajax.BeginForm(\"Post\", \"Forum\", new {threadId = Model.Thread         


        
4条回答
  •  天命终不由人
    2021-01-05 20:42

    Thanks to "Darin Dimitrov" and his answer for pointing out a lot about this. But just adding to it, I know this might be simple but this got me,

    My mistake was that I thought

    jquery.validate.unobtrusive.js
    

    and

     jquery.unobtrusive-ajax.js
    

    where the same when they aren't. Make sure you use the "jquery.unobtrusive-ajax.js" found in Nuget.

    Microsoft.jQuery.Unobtrusive.Ajax

提交回复
热议问题