how to request collection of fields in mvc
Posted
by frosty
on Stack Overflow
See other posts from Stack Overflow
or by frosty
Published on 2010-05-06T14:05:04Z
Indexed on
2010/05/06
14:08 UTC
Read the original article
Hit count: 191
asp.net-mvc
i have the following foreach. Inside you'll see a text box for quantity. At the bottom of the page there is submit button. What is the best practise for saving a collection of fields like this in asp.net MVC. ie how would i get the values in my controller
<% foreach(var item in Model.Results) { %>
<tr class="RowStyle">
<td><input name="quantity" value="<%= item.Quantity %>" class"input-30" /></td>
</tr>
<% } %>
© Stack Overflow or respective owner