I've read through many reported issues relating to this, none have resolved the problem I'm having.
Model:
public class MySoftwareResults
{
public Shopping_MachineInformation MachineInformation { get; set; }
public ShoppingUserInformation UserInformation { get; set; }
public List<Shopping_MySoftwareResults> ApplicationsList { get; set; }
public string Requester { get; set; }
public MySoftwareResults()
{
MachineInformation = new Shopping_MachineInformation();
UserInformation = new ShoppingUserInformation();
ApplicationsList = new List<Shopping_MySoftwareResults>();
Requester = "";
}
}
Form:
@using (@Html.BeginForm("MySoftwareResults", "Client", FormMethod.Post))
{
<div class="form-group">
<table class="table table-responsive list-view">
<thead>
<tr>
<th>Software</th>
<th>Cost</th>
<th>Requires Approval</th>
<th>Status</th>
<th>Select</th>
</tr>
</thead>
<tbody>
@foreach (var item in Model.ApplicationsList)
{
<tr>
<td>
@Html.LabelForModel(item.Software)
</td>
<td>@Html.LabelForModel(item.Cost)</td>
<td>
@Html.LabelForModel(item.RequiresApproval)
</td>
<td>@Html.LabelForModel(item.Status)</td>
<td>
<input type="checkbox" id="Selected" name="Selected" value="@item.CollectionID"/>
</td>
</tr>
}
</tbody>
</table>
</div>
<div class="form-group">
<input type="submit" title="SUBMIT" class="btn btn-primary pull-right" id="butSubmit" />
</div>
}
The form populates perfectly. When I click on Submit the Model is empty:
[HttpPost]
public ActionResult MySoftwareResults(MySoftwareResults results)
{
var selected = axp.euc.sdsassistance.core.Queries.Shopping_ParseCheckedItems(Request.Form["Selected"]);...
}
I tried using Fiddler, but I can't find anything to reflect the model data being passes when the form loads.
I'm stumped.