display news list and individual

This commit is contained in:
2024-07-31 11:55:01 +03:30
parent f310a94d5c
commit 2002c9fe09
5 changed files with 67 additions and 23 deletions

View File

@ -1,7 +1,9 @@
@model WebApplication1.Models.news
@using WebApplication1.Models
@model news
@{
ViewBag.Title = "Details";
var _user = ViewBag.user as user;
}
<h2>Details</h2>
@ -23,8 +25,8 @@
</dt>
<dd>
<img src="@Model.image" />
@Html.DisplayFor(model => model.image)
<img src="@Url.Content(Model.image)" height="250" width="200" />
</dd>
<dt>
@ -68,11 +70,11 @@
</dd>
<dt>
@Html.DisplayNameFor(model => model.userID)
original poster
</dt>
<dd>
@Html.DisplayFor(model => model.userID)
@_user.displayname
</dd>
<dt>