Ok not sure what is going on with these checkboxes in the MVC Framework RC1 but here is what I got. I am creating checkboxes using a foreach loop on the view but when I try to access them using the Request.Form.Keys in the controller I get nothing back. My question is how is Request.Form.Keys populated? I know the checkbox inputs are on the form but I get nothing in terms of keys back.
Here are code samples
<% foreach (var item in Model){ %>
<tr align="center">
<% if (item.IsActive){ %>
<td><%= Html.CheckBox("session." + item.SessionID, item.SessionID)%></td>
<% } else { %>
<td><b>Closed</b></td>
<% } %>
And the controller uses this
foreach (String key in Request.Form.Keys)
{
if (key.StartsWith("Session."))
{
//Do Something
}
}
Any Ideas?