views:

1625

answers:

3

What parts of functionality will I lose after removing the

MicrosoftAjax.js

MicrosoftMvcAjax.js

files?

I don't want to use them for various reasons and I thought if there were any 3rd party helper methods that would mimic existing ones but are tied to another JavaScript framework, such as jQuery.

Also, please tell where usage of above javaScript files is preferrable/adviced.

Many thanks,

Valentin Vasiliev.

+1  A: 

You don't need those. Just remove them. Use JQuery instead.

Tim Scott
+5  A: 

You won't be able to use the AjaxHelper extension methods (in the System.Web.Mvc.Ajax namespace) that are exposed by the Ajax property on the ViewPage class if you don't refer to the MicrosoftAjax scripts. They're relatively easy to replace by using the appropriate jQuery AJAX methods ($.post, $.get, $(selector).load etc) or the jQuery form plugin.

As for whether one or another is preferable or not it's down to how comfortable you are with writing your own implementation. The Ajax helper methods try to take care of a lot of things for you in terms of client script programming but that comes at a price of having to load in the pretty heavyweight MS AJAX library. Rolling your own javascript methods can lead to more lightweight code as well as providing you with a choice of javascript library to use (be it jQuery or one of the many others out there).

sighohwell
+2  A: 

I agree. Just use jquery. Life is good with .net mvc 3.5 and jquery. cheers