I have a problem and I can\'t find solution. I\'m using Razor and it is my VieModel class.
public class GroupToExport { public GroupToExport() {
I found this works much better: Leave the foreach loop as is (do not user a counter)
@foreach (var item in Model.GroupToExport) {
Then use this Razor format to display a checkbox
@Html.CheckBox("Active", @item.ToExport)
Simple to use and does not make you change the typical foreach loop.