是“jquery.unobtrusive-ajax.js”过时了吗? [英] Is "jquery.unobtrusive-ajax.js" obsolete?
问题描述
我有一个古老的 MVC2 解决方案,我迁移到 MVC5 (Visual Studio 2013)。
I have an ancient MVC2 solution that I migrated to MVC5 (Visual Studio 2013).
I我想用新的库更新项目中使用的旧库。
I'd like to update the old libraries used in the project with the new ones.
我有例如。 jquery.unobtrusive-ajax.js
库。
它现在已经过时了吗?
I have by eg. the jquery.unobtrusive-ajax.js
library.
Is it obsolete as by now?
我问,因为该库引用
/// <reference path="jquery-1.4.4.js" />
但我升级了jQuery(我现在使用的是jQuery v1.8.3)。
but I upgraded the jQuery (I use the jQuery v1.8.3 by now).
如果它有什么要替换的(比如 jquery.validate.unobtrusive.js
(?))
If it with what to replace (like jquery.validate.unobtrusive.js
(?))
PS。
在默认的MVC项目中,Visual Studio 2013提出了以下验证脚本:
PS.
In a default MVC project Visual Studio 2013 proposes the folowing "validation" scripts:
jquery.validate-vsdoc.js
jquery.validate.js
jquery.validate.min.js
jquery.validate.unobtrusive.js
jquery.validate.unobtrusive.min.js
推荐答案
jquery.unobtrusive-ajax.js
是一个Microsoft库,用于支持 @Ajax。*
帮助程序,这个是一个插图,不引人注意地设置 jQuery Ajax
。
jquery.unobtrusive-ajax.js
is a Microsoft library for supporting @Ajax.*
helpers, this is a plugin that unobtrusively sets up jQuery Ajax
.
如果您使用 @Ajax
代码中的助手,例如 ActionLink 或 BeginForm ,以及更新 jQuery
你必须更新Microsoft jQuery Unobtrusive Ajax ,否则你可以删除它。
If you use @Ajax
helpers in your code, like ActionLink or BeginForm, along with updating jQuery
you have to update the Microsoft jQuery Unobtrusive Ajax, otherwise you can remove it.
如果删除对 jquery.unobtrusive-ajax.js
的引用, @Ajax
帮助者将作为常规 @Html
助手工作。
If you remove reference to the jquery.unobtrusive-ajax.js
, @Ajax
helpers will be working as regular @Html
helpers.
我怎么知道我是否还在使用它们?
How can I know if I still use them?
尝试寻找这些方法的用法。
Try to look for the usages of these methods.
这篇关于是“jquery.unobtrusive-ajax.js”过时了吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!