I use a for loop to populate a table:
@using (Html.BeginForm(null, null, FormMethod.Get, new { name = "frm", id = "frm" })) {
<table id="table1" border="1" style ="width:100%">
@for (int i = 1; i < 13; i++)
{
<tr>
<td>
@(i.ToString()+". Details")
</td>
<td>
<button type="button" onclick="invisiblize(i)">Show detail @i</button>
</td>
</tr>
}
</table>
Is it possible to assign IDs for the buttons generated after the above code?