Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.NET Ajax Control Kit versus JQuery

During the last 2 years JQuery has become more and more popular. So do you think, it is now time to prefer JQuery to ASP.NET Ajax in ASP.NET projects with Ajax? Has the ASP.NET Ajax Control Kit a future in the ASP.NET world?

like image 456
Kottan Avatar asked Jul 28 '10 12:07

Kottan


People also ask

What is ASP NET AJAX Control Toolkit?

Ajax Control Toolkit is a web development tool that is an open-source library. It is a joint effort between the ASP.NET Ajax community and Microsoft which provides a very powerful infrastructure for writing customizable, reusable, and extensible ASP.NET Ajax extenders and controls.

Why do we need AJAX in asp net?

AJAX allows web pages to be updated asynchronously by exchanging small amounts of data with the server behind the scenes. This means that it is possible to update parts of a web page, without reloading the whole page. Classic web pages, (which do not use AJAX) must reload the entire page if the content should change.

What is JQuery asp net?

JQuery is a JavaScript library. It is helpful and make easy to handle HTML DOM (Document Object Model), Events and Animation and Ajax functionalities. JQuery reduce code compared to JavaScript. Mostly we use JQuery or JavaScript for client side activities and make Ajax call to ASP.NET Web form/mvc, Web service and WCF.


1 Answers

Short answer:

If your page/site isn't currently depending on the UpdatePanel or ACT controls, definitely use jQuery and jQuery UI for any new work. That's even Microsoft's own recommendation now.

Long answer:

It's important to be clear about terminology when dealing with this topic.

ASP.NET AJAX is part client-side, but also part server-side. System.Web.Extensions came from Atlas and was eventually integrated into ASP.NET 3.5. Even if you don't use a ScriptManager or MicrosoftAjax.js, the server-side portions of ASP.NET AJAX are still very useful for creating JSON-based server-side endpoints (and those may be called directly from jQuery, with no ScriptManager).

jQuery and MicrosoftAjax.js are somewhat similar, but both do things that the other doesn't. It's not strictly accurate to say that they compete with each other; they have different goals. If your application has any UpdatePanels, you have no choice but to include MicrosoftAjax.js (which is coming in automatically with the ScriptManager). jQuery and MicrosoftAjax.js do play nice together though, so you can still use jQuery's more powerful selectors, traversals, and animations in conjunction with UpdatePanels if you must.

The AJAX Control Toolkit (ACT) is a different project, entirely separate from ASP.NET AJAX. It most directly compares with jQuery UI, not jQuery core itself. Going forward, I think we'll see most of the client-side-only AJAX Control Toolkit controls refactored as jQuery plugins (that already happened late last year, but they were pulled).

Ultimately, it's best to favor jQuery or jQuery UI over MicrosoftAjax.js or the ACT if an equivalent solution exists in both. However, if you're tied to MicrosoftAjax.js with UpdatePanels or other existing code, don't be afraid to mix jQuery with that and transition to jQuery slowly. They work great together.

like image 52
Dave Ward Avatar answered Sep 22 '22 08:09

Dave Ward