ASP.Net MVC 3.0 Ajax.BeginForm is redirecting to a Page?

前端 未结 1 1797
南笙
南笙 2021-01-17 23:22

In ASP.Net MVC 3.0 i am using a Ajax.Beginform

and hitting a JsonResult on success of the form i am calling a jQuery Function. but for some reason my form is redirec

相关标签:
1条回答
  • 2021-01-18 00:28

    when this happens its almost always because your script files aren't loaded

    note from:

    http://completedevelopment.blogspot.com/2011/02/unobstrusive-javascript-in-mvc-3-helps.html

    1. Set the mentioned flag in the web.config:
      1. Include a reference to the jQuery library ~/Scripts/jquery-1.4.4.js
      2. Include a reference to the library that hooks this magic at ~/Scripts/jquery.unobtrusive-ajax.js

    So load up fiddler http://fiddler2.com and see if the scripts are being called and loaded.

    0 讨论(0)
提交回复
热议问题