Is “jquery.unobtrusive-ajax.js” obsolete?

半腔热情 提交于 2019-12-03 09:26:39

jquery.unobtrusive-ajax.js is a Microsoft library for supporting @Ajax.* helpers, this is a plugin that unobtrusively sets up jQuery 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.

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.

You were asking how you can make sure whether you have the latest jquery-unobtrusive-ajax.js installed (or how to check whether it may be obsolete).

Visual Studio 2010+ comes with the NuGet package manager console (PMC). To see if your project's external references (like, e.g., unobtrusive AJAX) are still up to date:

  1. Open your project in Visual Studio
  2. Right-click your project in Solution Explorer
  3. Select "Manage NuGet packages"
  4. Select the package you want to update (unobtrusive AJAX a/o unobtrusive validation)
  5. Here you can see whether you're using the latest version of the external reference or if an update is available.
  6. Press the [Update] button.
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!