<div style="height:180px;">
<table id="tblheader" style="border:none 0px black;width:100%;background:none;">
<tbody>
<tr>
@{
foreach (var ImageDataInfo in Model.JobImages.ImageDataInfo)
{
<td style="border-bottom: 1px solid #000000;">
<img src="@ImageDataInfo.ImageData"
style="width:100px;height:100px;align-content:center;" />
</td>
}
}
</tr>
</tbody>
</table>
</div>
ImageDataInfo.ImageData
是一个base64字符串。图像未加载。请帮忙。
试试这个:
<img src="data:image;base64,@System.Convert.ToBase64String(ImageDataInfo.ImageData)" style="width:100px;height:100px;align-content:center;" />