-
Notifications
You must be signed in to change notification settings - Fork 25.3k
/
Index.cshtml
50 lines (44 loc) · 1.16 KB
/
Index.cshtml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
@using ViewComponentSample.Models
@model IEnumerable<TodoItem>
<h2>ToDo Starter</h2>
<table class="table">
<tr>
<th>
@Html.DisplayNameFor(model => model.IsDone)
</th>
<th>
@Html.DisplayNameFor(model => model.Priority)
</th>
<th>
@Html.DisplayNameFor(model => model.Name)
</th>
<th></th>
</tr>
@foreach (var item in Model)
{
<tr>
<td>
@Html.DisplayFor(modelItem => item.IsDone)
</td>
<td>
@Html.DisplayFor(modelItem => item.Priority)
</td>
<td>
@Html.DisplayFor(modelItem => item.Name)
</td>
</tr>
}
<!-- <snippet2> -->
</table>
<div>
Maximum Priority: @ViewData["maxPriority"] <br />
Is Complete: @ViewData["isDone"]
<!-- <snippet> -->
@await Component.InvokeAsync("PriorityList",
new {
maxPriority = ViewData["maxPriority"],
isDone = ViewData["isDone"] }
)
<!-- </snippet> -->
</div>
<!-- </snippet2> -->