开发者

How MVC Update Model works with incomplete objects?

I have a view that is bound to an object called "开发者_C百科Requisition" On this view we are only modifying is child records.

My question is: When I submit the form I have the object requisitionForm, and this object is only partially complete.

How do I save just the new changes?

Should I take the requisitionForm (incomplete) and merge it with requisition (complete) ?

thanks!

How MVC Update Model works with incomplete objects?


Remove the requisitionForm parameter, and call UpdateModel(requisition)


Is this what you want? http://www.joe-stevens.com/2010/02/17/asp-net-mvc-using-controller-updatemodel-when-using-a-viewmodel/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜