I am developing a C# MVC application. I am using a View and Display template to manage the User Interface. The Users are able to edit the data presented on multiple pages. I am having an issue posting the Datatable data from all pages to the Controller. The List object in the Model returned to the Controller contains the correct number of rows, but the column values of all the rows except the rows on the last edited page are null. How do I post all of the data to the Controller? **Code from my View:** @model TreatyMilestonesViewModel @{ ViewData["Title"] = "Treaty Milestones"; } @using (@Html.BeginForm()) {

@Model.SelectedTreatyName - Treaty Milestones

@Html.HiddenFor(modelItem => modelItem.SelectedTreatyId) @Html.DisplayFor(model => model.TreatyMilestonesList)
@Html.Label("Assigned Milestone") @Html.Label("Milestone Description") @Html.Label("Milestone SLA") @Html.Label("Processing Period") @Html.Label("Inactive") @Html.HiddenFor(modelItem => modelItem.SelectedTreatyId) @Html.HiddenFor(modelItem => modelItem.SelectedTreatyName)
Back to Treaty Selection
} **Code form my Display Template: ```@model MilestoneTracking.Models**.TreatyMilestonesList @if (this.ViewContext.HttpContext.Request.Cookies["mtaUserRole"] != "IsAppUser") { @Html.CheckBoxFor(modelItem => modelItem.AssignedMilestone, new { onchange="enableFields(this)"}) } else //This is an "AppUser", do not allow editing { @Html.CheckBoxFor(modelItem => modelItem.AssignedMilestone, new { disabled = "disabled" }) } @Html.DisplayFor(modelItem => modelItem.MilestoneDescription) @if (Model.AssignedMilestone) { @Html.TextBoxFor(modelItem => modelItem.TreatyMilestoneSLA, new { type = "number" }) } else { @Html.TextBoxFor(modelItem => modelItem.TreatyMilestoneSLA, new { disabled = "disabled", type = "number" }) } @Html.ValidationMessageFor(modelItem => modelItem.TreatyMilestoneSLA) @Html.DisplayFor(modelItem => modelItem.ProcessingPeriod) @if (Model.AssignedMilestone) { @Html.CheckBoxFor(modelItem => modelItem.Inactive) } else { @Html.CheckBoxFor(modelItem => modelItem.Inactive, new { disabled = "disabled" }) } @*These were put here for two reasons; 1. They are within a to eliminiate HTML warning 1503 "Unexpected start tag" 2. They were initially moved within the first column to eliminate the warning, but having them there broke the checkbox sorting feature hence I moved them to their own cell.*@ @Html.HiddenFor(modelItem => modelItem.TreatyMilestoneId) @Html.HiddenFor(modelItem => modelItem.TreatyId) @Html.HiddenFor(modelItem => modelItem.MilestoneId) @Html.HiddenFor(modelItem => modelItem.TreatyName) **Code from Controller:** ``` [HttpPost] public ActionResult SaveMilestones(TreatyMilestonesViewModel _model) { // retrieve the as-is state of currently assigned Milestones List currentlyAssignedMilestones = GetCurrentlyAssignedMilestones(_model.SelectedTreatyId); // Let's create this now and we will assign the TreatyId and TreatyName to be passed back to the View after processing is completed TreatyMilestonesViewModel vm = new TreatyMilestonesViewModel() { //SelectedTreatyId = _model.TreatyMilestonesList[0].TreatyId, //SelectedTreatyName = _model.TreatyMilestonesList[0].TreatyName SelectedTreatyId = _model.SelectedTreatyId, SelectedTreatyName = _model.SelectedTreatyName }; foreach (TreatyMilestonesList tmlrec in _model.TreatyMilestonesList) { ...