<table class="table">
<tr>
<th>
@Html.DisplayNameFor(model => model.CategoryName)
</th>
<th>
@Html.DisplayNameFor(model => model.Description)
</th>
<th>
@Html.DisplayNameFor(model => model.Picture)
</th>
<th></th>
</tr>
@foreach (var item in Model) {
<tr>
<td>
@Html.DisplayFor(modelItem => item.CategoryName)
</td>
<td>
@Html.DisplayFor(modelItem => item.Description)
</td>
<td>
@if (item.Picture != null)
{
<img src="data:image/png;base64,
@Convert.ToBase64String(item.Picture,78,item.Picture.Length-78 ,
Base64FormattingOptions.None)"
alt="Image" />
}
</td>
<td>
@Html.ActionLink("Edit", "Edit", new { id=item.CategoryID }) |
@Html.ActionLink("Details", "Details", new { id=item.CategoryID }) |
@Html.ActionLink("Delete", "Delete", new { id=item.CategoryID })
</td>
</tr>
}
</table>
Yorumlar
Yorum Gönder