I know how to map individual checkboxes into MVC ViewModel like:
@Html.LabelFor(model => model.OnlyThisNetwork)
@Html.CheckBoxFor(model => model.OnlyThisNetwork)and
[DisplayName("Only this network")]
public bool OnlyThisNetwork { get; set; }
But what about this table of checkboxes? I can't figure out to do it.
<table>
<thead>
<tr>
<th class="add">Frequency/Format</th>
<th>All</th>
<th>Email</th>
<th>Mobile</th>
<th>Social</th>
</tr>
</thead>
<tbody>
<tr>
<td class="add">As it happens</td>
<td><input type="checkbox" title="bike" id="social" class="checkbox"></td>
<td><input type="checkbox" title="bike" id="social" class="checkbox"></td>
<td><input type="checkbox" title="bike" id="social" class="checkbox"></td>
<td><input type="checkbox" title="bike" id="social" class="checkbox"></td>
</tr>
<tr>
<td class="add">Once a week</td>
<td><input type="checkbox" title="bike" id="social" class="checkbox"></td>
<td><input type="checkbox" title="bike" id="social" class="checkbox"></td>
<td><input type="checkbox" title="bike" id="social" class="checkbox"></td>
<td><input type="checkbox" title="bike" id="social" class="checkbox"></td>
</tr>
<tr>
<td class="add">Once a month</td>
<td><input type="checkbox" title="bike" id="social" class="checkbox"></td>
<td><input type="checkbox" title="bike" id="social" class="checkbox"></td>
<td><input type="checkbox" title="bike" id="social" class="checkbox"></td>
<td><input type="checkbox" title="bike" id="social" class="checkbox"></td>
</tr>
</tbody>
</table>
Can anyone help? I changed the post to reflect the MVC code I am binding to.