Skip to content

Instantly share code, notes, and snippets.

@andrewjamesford
Created June 11, 2012 00:19
Show Gist options
  • Save andrewjamesford/2907820 to your computer and use it in GitHub Desktop.
Save andrewjamesford/2907820 to your computer and use it in GitHub Desktop.
Table Row count in Razor
<table>
@{
int Count = 0;
}
@foreach (var item in Model)
{
<tr data-row="@Count">
<td></td>
<td></td>
<td></td>
</tr>
Count++;
}
</table>
@mreeers
Copy link

mreeers commented Jan 22, 2020

Thanks! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment