dotnettutorial-asp-dot-net-mvc/AttributeRoutingDemoInMVC/Views/Students/View.cshtml

29 lines
597 B
Plaintext

@model IEnumerable<AttributeRoutingDemoInMVC.Models.Student>
@{
ViewBag.Title = "GetAllStudents";
}
<h2>GetAllStudents</h2>
<table class="table">
<tr>
<th>
@Html.DisplayNameFor(model => model.Id)
</th>
<th>
@Html.DisplayNameFor(model => model.Name)
</th>
</tr>
@foreach (var item in Model)
{
<tr>
<td>
@Html.DisplayFor(modelItem => item.Id)
</td>
<td>
@Html.DisplayFor(modelItem => item.Name)
</td>
</tr>
}
</table>