Well, this is just embarrassing. I can\'t even figure out a simple increment in one of my views in ASP.NET MVC3 (Razor). I have done searches and it appears that the docum
If all you need to do is display the numbering, an even cleaner solution is increment-and-return in one go:
@{ var counter = 0; } @foreach(var hat in Ring){ Hat no. @(++counter) }
Hat no. @(++counter)