MVC5,AjaxHelper,它和正确的脚本和放大器;加载顺序 [英] MVC5, AjaxHelper, and the Correct Scripts & Load Order

查看:205
本文介绍了MVC5,AjaxHelper,它和正确的脚本和放大器;加载顺序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

OK,我感到非常可笑,我要发布一个新问题找到答案,但是,唉我在这里。让我们把这种尽可能简单下一个任性的灵魂寻找解决这个问题。

OK, I find it EXTREMELY ridiculous that I have to post a new question to find the answer but, alas here I am. Let's make this as simple as possible for the next wayward soul looking to resolve this.

什么是所有我需要得到阿贾克斯形式工作的最新脚本? 到目前为止,我有;

What are all the most current scripts I require to get the ajax form working? Thus far I have;

<script src="//ajax.aspnetcdn.com/ajax/jQuery/jquery-1.11.0.js"></script>
<script src="//ajax.aspnetcdn.com/ajax/jquery.ui/1.10.4/jquery-ui.min.js"></script>
<script src="//ajax.aspnetcdn.com/ajax/jquery.validate/1.12.0/jquery.validate.js"></script>
<script src="//ajax.aspnetcdn.com/ajax/mvc/5.0/jquery.validate.unobtrusive.min.js"></script>

我看到那个状态,我需要jquery.unobtrusive-ajax.js以及页面,但只是给我一个错误。难道我也有些不兼容的版本装?

I have seen pages that state I need jquery.unobtrusive-ajax.js as well, but that just gives me an error. Do I have some incompatible versions loaded?

我的工作,但它只是愚蠢的,我似乎无法找到一个简单的页面说明code期望为最新版本。

I've worked with this several times in the past for MVC3 etc, but it's just silly that I cannot seem to find a simple page explaining the code expectations for the current version.

感谢你在前进的人谁可以帮我从那里似乎被牢牢地贴在今天下午删除我的头。

Thank you in advance to anyone who can help me remove my head from where it appears to be firmly stuck this afternoon.

推荐答案

最起码你需要的 AjaxHelper

的NuGet包微软jQuery的不显眼的Ajax 3.1.2

> Install-Package Microsoft.jQuery.Unobtrusive.Ajax -Version 3.1.2

现在包含脚本

<script src="~/jquery-1.11.0.js"></script>
<script src="~/jquery.unobtrusive-ajax.js"></script>

继续前进,如果有获取最新版本。予指定V3.1.2以证明AjaxHelper在特定的时间工作至少这个特定版本

Go ahead and get the latest version if available. I specified v3.1.2 to demonstrate that the AjaxHelper worked for at least this particular version at a particular time.

这篇关于MVC5,AjaxHelper,它和正确的脚本和放大器;加载顺序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆