Peuge
Peuge

Reputation: 1491

MVC3 order form with multiple items

Im new to MVC3 so please excuse me. I have the following situation: I have a simple order form and each order can have multiple products attached to it. I want this all to be on one form, so the user will be presented with a form to fill out all their information as well as select a product from a drop down list. They can then click "Add Another" and another dropdown list will appear from which they can select another product. My question is how do I access these dynamically created dropdownlist values from the controllers action? I come from Webforms and so am still trying to wrap my head around things.

Any help much appreciated.

Thanks

Upvotes: 1

Views: 2140

Answers (1)

Rafay
Rafay

Reputation: 31043

here is an excellent post for making master detail in mvc.net

http://zahidadeel.blogspot.com/2011/05/master-detail-form-in-aspnet-mvc-3-i.html


also model binding to a list by phil haack is a must read

Upvotes: 2

Related Questions