how to make items in a foreach display on their own line cshtml code example
Example 1: cshtml foreach
@foreach (var item in Model.Foos)
{
<div>@item.Bar</div>
}
Example 2: cshtml foreach display
@for (int i=0; i < Model.allemp.Count;i++)
{
<tr>
<td>@Html.Label(Model.allemp[i])</td>
<td>@Html.Label(Model.alldept[i])</td>
</tr>
}