How to perform for each loop in Razor view?
It is similar to the for loop except that it can be done only to those collection that has similar type of objects in it as it is in C#.
<ol> @foreach (var variable in Request.ServerVariables) { <li>@variable</li> } </ol>
No comments:
Post a Comment