Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is "jquery.unobtrusive-ajax.js" obsolete?

I have an ancient MVC2 solution that I migrated to MVC5 (Visual Studio 2013).

I'd like to update the old libraries used in the project with the new ones.

I have by eg. the jquery.unobtrusive-ajax.js library. Is it obsolete as by now?

I ask because that library references

/// <reference path="jquery-1.4.4.js" /> 

but I upgraded the jQuery (I use the jQuery v1.8.3 by now).

If it with what to replace (like jquery.validate.unobtrusive.js(?))

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 
like image 774
serhio Avatar asked Apr 30 '14 13:04

serhio


1 Answers

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.

like image 195
Zabavsky Avatar answered Sep 24 '22 15:09

Zabavsky