I have a basic ViewModel with a property that is a List of complex types. When binding, I seem to be stuck with getting either the list of values, OR the other model propert
Try to change the code for the Data collection to this, and let MVC take care of the naming:
@for (int i = 0; i < Model.Data.Count(); i++) { @Html.HiddenFor(m => m.Data[i].Id) @Html.HiddenFor(m => m.Data[i].ParentId) @Html.HiddenFor(m => m.Data[i].Name) @Html.TextBoxFor(m => m.Data[i].Value) }