I\'m using MVC and I have some RadioButtons in a foreach:
foreach (var item in group) {
-
One way is to use a for loop and RadioButton instead of RadioButtonFor
@for (int i = 0; i < item.Count; i++)
{
@Html.RadioButton("item_CheckerApproved_" + i, true, item[i].CheckerApproved)
@Html.RadioButton("item_CheckerApproved_" + i, false, !item[i].CheckerApproved)
}
- 热议问题