ASP.NET MVC AjaxHelpers recommended usage

172 Views Asked by At

It seems all the examples I come across specifiy an UpdateTargetId to render out the HTML content of the Ajax response. This is quite a bit different than how it's done in the Rails world, where the response content contains JavaScript code which manipulates the page. The Rails convention seems more powerful.

What's the recommended usage that makes the ASP.NET MVC approach powerful? What are its advantages?

1

There are 1 best solutions below

2
On BEST ANSWER

There's no equivalent of Rails RJS generators in ASP.NET MVC though it might be implemented. So out-of-the box the Rails convention is more powerful, but IMHO it is questionable if returning Javascript from asynchronous actions is a good thing (Json and Xml are prefered).