这有效
@Html.EditorFor(model => model.Data, new { htmlAttributes = new { @class = "form-control" } })
下一行不喜欢“model => model.Data”
<img src="data:image;base64,@System.Convert.ToBase64String(model => model.Data)" height="80" />
答案 0 :(得分:1)
@if (Model.Data != null)
{
<img src="data:image;base64,@System.Convert.ToBase64String(Model.Data))" height="80" />
}