Reputation: 43
@foreach (var item in Model.Foos)
{
<div>
@item.Label
@item.Var1
@item.Var2
@item.Var3
@item.Var4
</div>
}
I want to display a div container like above with only the first row of each of columns of the table. I understand the logic but would I be using an indexed for loop instead and if so how would I implement that. I want the loop to go all the way through each row in the table ad display each row separately. Let me know if you need me to elaborate and if I'm not being clear. Will the code above do I want?
I think I was unclear about this I want it to display one row at a time but I still need it to go through the whole table.
Upvotes: 0
Views: 818