MVC 创建带图片的<A></A>标签

                    <a href="@Url.Action("Detail", "Product", new { messageId = item.message.MessageId })" class="js-fancybox">
                                            @{
                                                if (item.Attachment.Count > 0)
                                                {
                                                    <img  src= "@item.Attachment[0].Parth" alt="@item.message.MessageTitle"/>
                                                }
                                                else
                                                {
                                                    <img src="#" alt="@item.message.MessageTitle" />
                                                }
                                        }
                                     </a>

 

<a href="@Url.Action("CutImg","ListenMedia", new { item, id = ViewBag.id })">
<img id="@item" src="@item" width="200" height="100" />
</a> 

posted @ 2013-08-01 09:42  虫虫飞520  阅读(2271)  评论(0编辑  收藏  举报