Question

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.

Was it helpful?

Solution

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.

OTHER TIPS

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?

I'm working on a project with a lot of UpdatePanel and jQuery, things just work 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 worse.

Also jQuery has functionalitys related to AJAX,so you can make elegant client side coding with jQuery which 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 inappropriate way.

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

Good luck!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top