Nested Model binding in ASP.NET MVC2. fields_for from rails equivalent
- by dagda1
Hi,
I am looking for some examples of how to do model binding in ASP.NET MVC2 for COMPLEX objects.
All the exmples I can find are of simple objects with no child collections or child objects.
If I have an Expense object with a child ExpensePayment object.
In rails, child objects are rendered with the HTML name attributes like this:
expense[expense_payment][net]
Rails uses fields_for to render child objects.
How can I accomplish something similar in ASP.NET MVC2?
Cheers
Paul