I'm working on a MVC3 web-application and encounter a problem when passing values from my model back to a Action using AJAX.
When I
1) browse to this view 2) alter the Quantity textbox 3) hit save
I get the same value for "Quantity" as I get when I pass the Model into the View. I would expect the Model to be synchronous with the Textfields but apperently they are not. I need either the Model to be synchronized - or some other way of getting the new "Quantity" value into the ActionLink.
-- SOLUTION :
Basically the reason why my FormCollection did not update was because I was using the Html.BeginForm function, and calling Ajax.ActionLink. These do not work well together. When changing to Ajax.BeginForm I successfully was able to return the updated FormCollection.
(I cannot paste code here now because it's been refactored alot and is not recognizable)