0

我正在尝试将图像链接到来自数据库的页面。

    @foreach (var item in model)
   <tr>
   <td>
   <img width="50" height="50" src="@Url.Action("GetImage", "Product", new { item.ProductId})"/>
   </td>
   ...

我现在怎样才能拥有此图像,单击时,转到某个操作

4

1 回答 1

0

将您的图像包装在a标签中。

<a href="SOME_URL_HERE">
    <img width="50" height="50" src="@Url.Action("GetImage", "Product", new { item.ProductId})"/>
</a>
于 2013-05-02T01:38:41.630 回答