Is there a simple solution?
Yes.
What am I missing?
Editor Templates.
Do I need to use an editor template?
Yes.
If so, any examples compatible with MVC4 would be fantastic.
ASP.NET MVC 4? , ASP.NET MVC 2. , , .
, foreach :
@model MyViewModel
@Html.EditorFor(x => x.Parents)
, , , Parents (~/Views/Shared/EditorTemplates/Parent.cshtml):
@model Parent
@Html.EditorFor(x => x.Children)
Children (~/Views/Shared/Editortemplates/Child.cshtml), foreach:
@model Child
@Html.TextAreaFor(x => x.name)
ASP.NET MVC. , Parents IEnumerable<Parent> Children IEnumerable<Child>. .
: , foreach for ASP.NET MVC, , , /.