开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜