Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Custom List property not being updated from MVC View
- public List<MarketingModel> Marketing { get; set; }
- this.Marketing = new List<MarketingModel>();
- @foreach (MarketingModel m in Model.Marketing)
- {
- <td class="title">@Html.DisplayFor(model => m.Name)</td>
- <td>@Html.CheckBoxFor(model => m.Mail)</td>
- <td>@Html.CheckBoxFor(model => m.Email)</td>
- }
- @for (int i = 0; i < Model.Marketing.Count; i++)
- {
- <td class="title">@Html.DisplayFor(model => Model.Marketing[i].Name)</td>
- <td>@Html.CheckBoxFor(model => Model.Marketing[i].Mail)</td>
- <td>@Html.CheckBoxFor(model => Model.Marketing[i].Email)</td>
- }
Add Comment
Please, Sign In to add comment