ASP.NET AJAX与JQuery的用于Web服务调用NET、ASP、AJAX、Web

2023-09-10 21:36:57 作者:半岛弥音

我倾我的脚到同时使用一个应用程序ASP.NET AJAX(ControlToolkit等)以及jQuery的。

I am dipping my feet into an app that uses both ASP.NET Ajax (ControlToolkit, etc.) as well as Jquery.

有什么优点/缺点使用ASP.NET AJAX机制调用JSON序列化.NET Web服务的方法......与使用JQuery的阿贾克斯()? (或者是6和1/2十?)

Are there any pros/cons to using the ASP.NET Ajax mechanics for calling JSON-serialized .NET web service methods ... vs. using JQuery .ajax()? (Or is it "6 and 1/2 dozen"?)

谢谢!

推荐答案

ASP.NET Ajax是pcated德$ P $,我相信,不再支持。这是pretty的体积大过,因为它试图生成JavaScript对象,而不是只使用JSON。 $。阿贾克斯强烈推荐来代替。

ASP.NET Ajax is deprecated and, I believe, no longer supported. It is pretty bulky too, as it tries to generate JavaScript objects instead of just using JSON. $.ajax is strongly recommended instead.

这里是一个博客帖子,讨论的情况。原来,ASP.NET AJAX被移动到Ajax控件工具包,它本身正在向服务器控制的重点。所以,如果你使用ASP.NET WebForms和所有的< ASP:无论/> 控件,Ajax控件工具包就OK ...否则,如如果你正在使用ASP.NET MVC,绝对坚持使用jQuery的。

Here is a blog post that discusses the situation. It turns out ASP.NET Ajax is being moved into the Ajax Control Toolkit, which itself is shifting to a server-control focus. So if you're using ASP.NET WebForms and all the <asp:Whatever /> controls, Ajax Control Toolkit is OK... otherwise, e.g. if you're using ASP.NET MVC, definitely stick with jQuery.