Q:

cshtml foreach display

@foreach (var item in Model.Foos)
{
    <div>@item.Bar</div>
}
0
@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>

}
0

New to Communities?

Join the community