I want to submit the table row values of the rows that are checked to my controller. My controller is always receiving a parameter of value null.
@model IEnumerable<GoogleMapsAPIWeb.Models.Schedule> @using (Html.BeginForm("Route", "Home", FormMethod.Post)) { <div> <table id="schedulerTable"> <thead> <tr> <th scope="col"></th> <th scope="col" >View</th> <th scope="col">Site Id</th> </tr> </thead> <tbody> @foreach (var row in Model) { <tr> <td>@Html.CheckBoxFor(c=>row.isSelected)</td> <td class="smallerDataField"> <a>View</a>@*TODO add code to view*@ </td> <td><div class="smallerDataField">@row.SiteId</div></td> </tr> } </tbody> </table> <input id="btnFindRoute" type="submit" value="Plan Route" /> </div> } [HttpPost] public ActionResult Route(IEnumerable<Schedule> Schedules) {
<td>@Html.CheckBoxFor(c=>row.isSelected)</td>?