ASP.NET MVC 3 and jquery.unobtrusive-ajax.min.js

I want to use the Ajax.ActionLink Html helper, so I need the jquery.unobtrusive-ajax.min.js library, but IE always shows this error:

Microsoft JScript runtime error: Unable to set property to “unobtrusive”: object is null or undefined

I read that the solution is to use jquery.validate.min.js and jquery.validate.unobtrusive.min.js, but then I cannot recognize the ajax call on the server side.

+5
source share
2 answers

I read that the solution is to use jquery.validate.min.js and jquery.validate.unobtrusive.min.js

, 2 script jquery.unobtrusive-ajax.min.js. . Ajax. * , , jQuery jquery.unobtrusive-ajax.min.js ( THAT).

, AJAX :

<script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.unobtrusive-ajax.min.js")" type="text/javascript"></script>

, 2 ( THAT):

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

, , Microsoft*.js . ASP.NET MVC 3 . , AJAX web.config, ajax Microsoft:

<appSettings>
    <add key="webpages:Version" value="1.0.0.0"/>
    <add key="ClientValidationEnabled" value="true"/>
    <add key="UnobtrusiveJavaScriptEnabled" value="true"/>
</appSettings>
+20

All Articles