<<назад Students/Index.vbhtml (Contoso University).
1: @ModelType IEnumerable(Of CU_VB_3.Models.Student)
2: @Code
3: ViewData("Title") = "Index"
4: Layout = "~/Views/Shared/_Layout.vbhtml"
5: End Code
6:
7: <h2>Index</h2>
8:
9: <p>
10: @Html.ActionLink("Create New", "Create")
11: </p>
12: <table class="table">
13: <tr>
14: <th>
15: @Html.DisplayNameFor(Function(model) model.LastName)
16: </th>
17: <th>
18: @Html.DisplayNameFor(Function(model) model.FirstMidName)
19: </th>
20: <th>
21: @Html.DisplayNameFor(Function(model) model.EnrollmentDate)
22: </th>
23: <th></th>
24: </tr>
25:
26: @For Each item In Model
27: @<tr>
28: <td>
29: @Html.DisplayFor(Function(modelItem) item.LastName)
30: </td>
31: <td>
32: @Html.DisplayFor(Function(modelItem) item.FirstMidName)
33: </td>
34: <td>
35: @Html.DisplayFor(Function(modelItem) item.EnrollmentDate)
36: </td>
37: <td>
38: @Html.ActionLink("Edit", "Edit", New With {.id = item.ID }) |
39: @Html.ActionLink("Details", "Details", New With {.id = item.ID }) |
40: @Html.ActionLink("Delete", "Delete", New With {.id = item.ID })
41: </td>
42: </tr>
43: Next
44:
45: </table>
Comments (
)
Link to this page:
//www.vb-net.com/EF-missing-FAQ/Code/Students-Index.vbhtml.htm
|