50 lines
1.2 KiB
Plaintext
50 lines
1.2 KiB
Plaintext
@model IEnumerable<WebApplication1.Models.news>
|
|
|
|
@{
|
|
ViewBag.Title = @ViewBag.title;
|
|
}
|
|
|
|
<h2>@ViewBag.title</h2>
|
|
|
|
<table class="table">
|
|
<tr>
|
|
<th>
|
|
@Html.DisplayNameFor(model => model.title)
|
|
</th>
|
|
<th>
|
|
@Html.DisplayNameFor(model => model.link)
|
|
</th>
|
|
<th>
|
|
@Html.DisplayNameFor(model => model.tag)
|
|
</th>
|
|
<th>
|
|
category
|
|
</th>
|
|
<th></th>
|
|
</tr>
|
|
|
|
@foreach (var item in Model)
|
|
{
|
|
<tr>
|
|
<td>
|
|
@Html.DisplayFor(modelItem => item.title)
|
|
</td>
|
|
<td>
|
|
@Html.DisplayFor(modelItem => item.link)
|
|
</td>
|
|
<td>
|
|
@Html.DisplayFor(modelItem => item.tag)
|
|
</td>
|
|
<td>
|
|
@Html.DisplayFor(modelItem => item.cat)
|
|
</td>
|
|
<td>
|
|
@Html.ActionLink("Edit", "Edit", new { id = item.ID }) |
|
|
@Html.ActionLink("Details", "Details", new { id = item.ID }) |
|
|
@Html.ActionLink("Delete", "Delete", new { id = item.ID })
|
|
</td>
|
|
</tr>
|
|
}
|
|
|
|
</table>
|