I have two classes ‘Product‘ and ‘Ingredient‘; In my view I have a ‘Product‘ object and I can create X ‘Ingredient‘ objects with javascript in a table.
How can I pass this List<Ingredient> from view to my controller and how should be the name of inputs of ‘Ingredient‘ if there’s more than one?
You just post them back to then controller.
Their name in the query string should be in this format:
and elements names in the HTML should be
Ingredient[x].property