最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - ASP.NET MVC without MicrosoftAjax.js and MicrosoftMvcAjax.js - Stack Overflow

programmeradmin3浏览0评论

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.

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.

Share Improve this question asked Feb 7, 2009 at 19:30 Valentin VValentin V 25.7k34 gold badges109 silver badges154 bronze badges
Add a comment  | 

3 Answers 3

Reset to default 12

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).

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

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

发布评论

评论列表(0)

  1. 暂无评论