Someone just posted the same advice. The example is small and doesn't really show the problem. Imagine that the customer was more complex then the need to rebuild the object on the client becomes a pain.
Is there any other approach? Something like data binding where the object can remain on the client and edits on the input controls automatically update the in memory object.
On a side note, big shouts to DevelopMentor!
Ok, so if you're interested and willing to take on a more sophisticated approach the consider using
Knockout.js. It's basically a MVVM framework for JavaScript. It's quite cool and I think will be exactly what you're looking for.
BrockAllen
All-Star
27574 Points
4912 Posts
MVP
Re: Ajax POST of Complex object to MVC Action
Mar 20, 2012 03:13 PM|LINK
Ok, so if you're interested and willing to take on a more sophisticated approach the consider using Knockout.js. It's basically a MVVM framework for JavaScript. It's quite cool and I think will be exactly what you're looking for.
And thx for the shout out :)
DevelopMentor | http://www.develop.com
thinktecture | http://www.thinktecture.com/