I am generating radiobuttonfor dynamically. My code runs as,
@{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++;
}
Here some radio buttons are having the same name. So I am unable to get the exact value. How to give different names for these radio buttons. Please help me in sorting this out.
Please try this