データベースに画像があり、それらをビューに表示したいのですが、これが私のモデルです:
public class SocialNetworkModel
{
[Required]
[DataType(DataType.Text)]
public string titlePost { get; set; }
[Required]
[DataType(DataType.Text)]
public string descriptionPost { get; set; }
public byte[] picturePost { get; set; }
}
これは私の見解です:
foreach (var item in Model) {
<tr id="row-@item.cinOw">
<td>
@Html.DisplayFor(modelItem => item.titlePost)
</td>
<td>
@Html.DisplayFor(modelItem => item.descriptionPost)
</td>
<td>
//here i want to put my image
</td>
</tr>
}
誰かが何か考えを持っていれば、私はとても感謝しています。