我有一张桌子而不是显示我的模型的一条记录.例如,类别列表.我想手动创建此表的行号.
<table class="table table-striped table-bordered table-hover table-full-width dataTable">
@foreach (var item in Model)
{
<tr>
<td>
**I want to Show Row Number Here**
</td>
<td>
@Html.ActionLink(item.Name, "ViewSubCategory", "ProductSubCategory", new { id = item.Id }, null)
</td>
</tr>
}
</table>
Run Code Online (Sandbox Code Playgroud)