ASP.Net MVC Getting index value in Razor ForEach - 24.10.21 - ErcanOPAK @{int i = 0;} @foreach(var myItem in Model.Members) { <span>@i</span> @{i++;} } Related posts:How to wrap very long text in Asp.Net RazorDefault Settings for Datatable in MVCHow to align inconsistently sized logos with CSSHow to get rows count in EntityFramework without loading contents Post Views: 0