views:

892

answers:

3

I really like the looks of jQuery UI and I'd love to integrate it into my ASP.NET Web Applications. I like the themes and how easy it is to use the widgets. I'm currently using AJAX Control Toolkit controls like the Calendar and ModalPopup. I'm hoping to replace them with the DatePicker and Dialog widgets, but I hear they have issues with UpdatePanels. There are workarounds for these issues, but I wonder, is it worth it?

Which leads into my question(s):

  • Has anyone had luck using jQuery UI widgets exclusively (instead of AJAX Toolkit Controls) in an ASP.NET Web Application that occasionally uses UpdatePanels?
  • Are there any best practice resources for getting jQuery UI and UpdatePanels to play nice?

Update: Based on the answers so far, it seems that the best thing to do is replace UpdatePanels with $.ajax and PageMethods. That should allow me to use jQuery UI without any issues and also improve my AJAX performance.

+1  A: 

No, it's not worth it. If the toolkit's calendar and modalpopup extenders are working for you, then just hold on to them.

In future projects, stay away from asp.net ajax and use jQuery exclusively. This way you wont run into any of the updatepanel problems. ASP.NET 4.0 Webforms are going to make using jQuery much easier in the past, because you will have more control of how controls get named when they are rendered to HTML.

Ronnie Overby
I've considered replacing the AJAX Control Toolkit with jQuery UI before and so far I've agreed with you. I was hoping that someone would prove me wrong =/.
jrummell
I mostly agree. Mostly. The end results are more aesthetically appealing, but it can be a lot of work for duplicating functionality.
Merritt
+1  A: 

Hy,

I'm working on a project with lot of UpdatePanel and Jquery,things just works fine.
Yes,it is a period when you need to learn,to make things work.

If you have a lot of UpdatePanels and you don't want to remove them then this is understandable,and using Jquery is just improving the UI,so it's not going to much worser.

Also Jqeury has functionalitys related to AJAX,so you can make elegant client side coding with jqeury wich is not related to Design and ui stuff.

I think if you search for Jquery and Ajax on the internet you will find a bunch of good examples,and fine techniques to both technologies together.

PS:

  • Remenber that UpdatePanel is evil in sort of way when you are using in an inapropriate way.

  • UpdatePanel is (and generally AJAX) is very customizable,make time for yourself to optimize it

Good luck!

Sad0w1nL1ght
+1 for update panel is evil... have to replace a couple of them for $.ajax equivalent...
MaLKaV_eS
I've already learned (and am OK with) the obstacles of UpdatePanel + jQuery. Now I'm interested in UpdatePanel + jQuery UI. I'll replace UpdatePanels with $.ajax() and PageMethods as I go (encosia.com/2007/07/…), but I still need to keep my existing UpdatePanels working.
jrummell
+1  A: 

We use Microsoft AJAX (only using UpdatePanels) and jQuery and all works great.

Using UpdatePanels makes all UserControls, Postbacks, Viewstate etc work as you would expect with the UI enhancements of jQuery. There are a few things to learn in getting them to work together and until we find an alternative we will continue to do this. We think its worth it.

I would be keen to see how UpdatePanels can be easily replaced with jQuery, but I expect one would need to write additional code for each UpdatePanel replacement, rather than letting asp.net handle things? Are there any articles out there that demonstrate replacing UpdatePanels that contain asp.net controls and UserControls with events etc?

Mark Redman
I've already learned (and am OK with) the obstacles of UpdatePanel + jQuery. Now I'm interested in UpdatePanel + jQuery UI. I'll replace UpdatePanels with $.ajax() and PageMethods as I go (http://encosia.com/2007/07/11/why-aspnet-ajax-updatepanels-are-dangerous/), but I still need to keep my existing UpdatePanels working.
jrummell
Just updating my previous answer here: We have moved to ASP.NET MVC and not using Microsoft AJAX at all and purely using jQuery for all AJAX. With regards replacing the UpdatePanel, there is no replacement as such, one needs to rethink the way pages and parts of the UI are updated. Once you start using jQuery AJAX only, it becomes apparent how much more efficient it is. I havent looked into how the UpdatePanel was implemented but I can expect it to be very bulky.
Mark Redman