problems with bulk editing in MVC 2 C#
I开发者_Go百科m having issues when trying to post a IList back to the controller here is some of the code
My controller
public ActionResult Approvals(ICollection
<
ApprovalListModel> model) {
My pages
<%@ Page Inherits="ViewPage
<
IList<
Book>>" %>
<% for (int i = 0; i < ViewData.Model.Count; i++) { %>
<%: Html.TextBoxFor(m => m[i].Title) %>...
But when it posts back it only ever returns the first item and missing data as well
Found the issue i was incrementing i twice so the sequence was out of wack wen 0 2 4 6 8 so it would only bring back 0 :-S
精彩评论