我正在动态生成单选按钮。我的代码运行为,
@{int questionCount = 0;
}
@{foreach (SectionDetail sectionDetail in section.SectionDetails)
{
<table>
<tr>
<td>
@Html.Label(sectionDetail.Title)
</td>
@{count = 0;
}
@foreach (SectionScore sectionScore in Model.IndividualSections)
{
<td class="ColSupplier">
@Html.RadioButtonFor(model => model.IndividualSections[count].SectionScores[questionCount].score.pass, true)Pass
@Html.RadioButtonFor(model => model.IndividualSections[count].SectionScores[questionCount].score.pass, false)Fail
</td>
count++;
}
</tr>
</table>
questionCount++;
}
这里一些单选按钮具有相同的名称。所以我无法得到确切的值。如何为这些单选按钮提供不同的名称。请帮我解决这个问题。