I'm starting a new ASP.NET MVC 3 project and am going to implement some screens that are read only by default but allow the user to edit information by clicking on an Edit button. I want these screens to be AJAXed. I have previously used the jQuery Form Plugin to implement similar screens on an ASP.NET MVC 2 project.
I've just discovered the existence of Ajax.BeginForm()
and was wondering whether I should use that since it is built in, instead of using the jQuery Form Plugin. I've done a Google search on the difference between the two techniques but couldn't find anything.
What I would like to know is which one (or a different one altogether) should I use with ASP.NET MVC 3.
What are the best practices and libraries for implementing AJAX forms in ASP.NET MVC?
What are the strengths and weaknesses of Ajax.BeginForm
vs the jQuery Form Plugin?
If you're going to use Ajax.BeginForm, I would suggest turning on UnobtrusiveJavaScript. One upside of using the built in mvc helpers is that it's one less library you need to include. Otherwise an upside of the jQuery.Form plugin I could see is more control of your event handling. As you don't have to worry about the MVC ajax form firing before you have a chance to do something.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With