I am looping through the data and I want to show 3 items per line, each item in a div.
Without knowing how many items the model currently contains.
@foreach (var item in Model)
{
<div class="content">
@item.StudentName
</div>
<div>
@item.StudentId
</div>
}
Please provide example, thanks!
1 Answer