2

I know there have been many posts on jquery vs ajax toolkit and I have read many of them. But I'm still not getting it completely. I'm hoping this question would clarify it for me unless it gets closed or voted down.

i have been reading a lot that jquery can replace MS Ajax tool kit completely. In my project (web forms), I am currently displaying a gridview that shows an ajax modal popup extender when row is clicked. That MPE has to talk to the database, get an object back and bind to the controls on the MPE popup. I'm assuming this is not easy to do with Jquery. There is no direct server interaction unless I do some web service or something like that. Even in that case, do I have to bring back the entire html preformatted?

If this is not achievable, how can Jquery replace the whole ajax tool kit. Have I misunderstood this?

coder net
  • 3,447
  • 5
  • 31
  • 40
  • Why do you need to replace the AjaxToolkit with jQuery? Some things are better/easier with ASP.NET-Ajax-Controls and some are better/easier/at all possible with jQuery. [My personal experience](http://stackoverflow.com/questions/5662263/jquery-dialog-postback-but-updatepanel-doesnt-get-updated) is that the ModalPopupExtender interacts better with ASP.NET-Ajax(f.e. async postbacks in popup)than jQuery UI Dialog. – Tim Schmelter Jun 16 '11 at 20:13
  • yes, thats what I thought too. but it seems that there is a general argument doing the rounds about not using AjaxToolkit at all. Did microsoft stop enhancing it? – coder net Jun 16 '11 at 20:18
  • @coder net: i haven't heart such thing, i'm sure that the AjaxControlToolkit will be further developed. I think that some might argue against it because jQuery has a wide distribution and is not ASP.NET specific. – Tim Schmelter Jun 16 '11 at 20:28
  • I guess you are right.. [this](http://www.msjoe.com/2011/03/is-it-the-end-for-the-ajax-control-toolkit/) is a good article. – coder net Jun 16 '11 at 20:33
  • @coder net: As a conclusion: if you are using ASP.NET-Ajax massively and don't planning to migrate to other technologies, you are doing fine with AjaxControlToolkit because it's made for it and prevents some issues that you might have with jQuery. You get faster sufficient results with less effort but you are less flexible and maybe lost if controls are not available. So you should also master jQuery as well. It's not only a control-collection but a framework that can help significantly to master clientside. – Tim Schmelter Jun 16 '11 at 20:41
  • @Tim, i have been using jquery for various operations (sliding, hover etc). Just didn't have enough experience to know if I can achieve the same server interaction as Ajax MPE. Looks like I can based on SLaks answer below, though I probably wouldn't do it right now. MPE seems simpler for this. There are a lot of things Jquery does better but for any popup that requires server interaction, MPE looks easier for now. I think your answer was more along the lines of what I asked.. if you can create a proper answer, I can mark it complete. Thanks for your help. – coder net Jun 16 '11 at 20:58

2 Answers2

2

Why do you need to replace the AjaxToolkit with jQuery? Some things are better or easier with ASP.NET-Ajax-Controls and some are better,easier or possible at all with jQuery. My personal experience is that the ModalPopupExtender interacts better with ASP.NET-Ajax(f.e. async postbacks in popup with ASP.NET-Ajax UpdatePanels)than jQuery UI Dialog.

Q: "Yes, thats what I thought too. but it seems that there is a general argument doing the rounds about not using AjaxToolkit at all. Did microsoft stop enhancing it? "

I haven't heart such thing, i'm sure that the AjaxControlToolkit will be further developed. I think that some might argue against it because jQuery has a wide distribution and is not ASP.NET specific.

Conclusion:

if you are using ASP.NET-Ajax massively and don't planning to migrate to other technologies, you are doing fine with AjaxControlToolkit because it's made for it and prevents some issues that you might have with jQuery. You get faster sufficient results with less effort but you are less flexible and maybe lost if controls are not available. So you should also master jQuery as well. It's not only a control-collection but a framework that can help significantly to master clientside.

Copied from my comments as requested

Community
  • 1
  • 1
Tim Schmelter
  • 450,073
  • 74
  • 686
  • 939
  • Note that this answer is now outdated. Microsoft stopped enhancing AjaxControlToolkit in 2014, [handing it off to DevExpress](https://blogs.msdn.microsoft.com/webdev/2014/09/30/the-ajax-control-toolkit-are-now-maintained-by-devexpress/). DevExpress makes a competing product (their AjaxControlToolkit has a comparison grid basically saying you should pay for their tool rather than use AjaxControlToolkit). – Brian Jun 06 '16 at 18:20
1

You can use jQuery UI Dialog and put an UpdatePanel inside of it, or (preferably) build your UI on the client using jQuery AJAX requests.

SLaks
  • 868,454
  • 176
  • 1,908
  • 1,964
  • I'm not sure if I completely understand building the UI on the client side using Jquery ajax requests remark. Lets say there are around 10 elements on the pop up that needs to be populated from the object. Can all these 10 come from a single ajax call? – coder net Jun 16 '11 at 19:58
  • can it bring back an object or something similar to it? – coder net Jun 16 '11 at 20:26
  • ok, i think my final question then is.. after we get this Json Object back, can I just say $(#div1).text = jobj.name, $(#div2).text = jobj.address etc. Of course, the syntax I used is just for illustrative purpose. – coder net Jun 16 '11 at 20:46
  • ok, then i need to read about how to do this. Thanks for your tips. – coder net Jun 16 '11 at 20:54