我有这样的foreach循环从我的分贝拉动图片:使得从数据库asp.net mvc的图片链接4
`@foreach (var item in model)
<tr>
<td>
<img width="50" height="50" src="@Url.Action("GetImage", "Product", new { item.ProductId})"/>
</td>
...`
我试图把它包在一个“A”的标签,但我得到的是404的。
<a href = "~/..."> <img width="".../></a>
任何想法?
是您的正确的图像显示?什么是获得404的URL? – 2013-05-06 05:15:42
图像是好的,但当我点击图片时,无论我选择的网址,我得到一个404 – rogerthat 2013-05-06 05:17:04
它正在尝试的URL是什么? – 2013-05-06 05:22:17