【发布时间】:2015-01-20 12:19:36
【问题描述】:
我可以像这样在索引文件中查看图像:
@*@Html.DisplayFor(modelItem => item.ImagePath)*@//Instead of this, I use the line below
<img src="~/Images/@item.ImagePath" height=100 width=200>
但在详细信息文件中我有这个:
@Html.DisplayFor(model => model.ImagePath)
当有 model 而不是 item 时,如何查看详细信息文件中的图像?我做了几次尝试,但都失败了。谢谢。
【问题讨论】:
-
Model.ImagePath来的文字是什么?
标签: asp.net asp.net-mvc asp.net-mvc-5