I understand that with jEditable (http://www.appelsiini.net/projects/jeditable) you can do in-place editing and POST the changed information to a URL.
My ASP.NET MVC view is displaying a bunch of Model information which I'd like to make in-place editable. Currently, I have two views - one text representation and one edit view in which a form is entirely POSTed and then my controller action takes the entire object (assembled from the form element names) as a parameter, updating the object and returning to the text-only view.
However, when I switch to jEditable I would only use the text view and POST a single item at a time, and not the entire object. How could I build a single controller action that can take what jEditable is POSTing and then put it into the appropriate property of my object?
Here is what I am doing through reflection:
View:
Controller:
The method "HelperMethods.ChangeType" is a more robust version of Convert.ChangeType (so it can handle nullables) that I got from http://aspalliance.com/author.aspx?uId=1026.
There's some pretty good sample code here:
You might also need this:
http://noahblu.wordpress.com/2009/06/17/jeditable-note-dont-return-json-and-how-to-return-strings-from-asp-net-mvc-actions/