MVC3 Html.ActionLink作为图像而不是文字 [英] mvc3 Html.ActionLink as image not as text

查看:119
本文介绍了MVC3 Html.ActionLink作为图像而不是文字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<div class="orderby_name">
@Html.ActionLink(" ", "DisplayCategory", "Categories", new { articleSortBy = "Name", articleSortType = "asc" }, null)
</div>

我在剃刀看着是否存在ImageLink的。现在我有@ Html.ActionLink和becouse我没有任何文本名称我不能点击它。我想有图像链接。

i am lookin in razor if exist ImageLink. Now i have @Html.ActionLink and becouse i do not have any text name i can not click on it. I want to have image as link.

我怎样才能使图像在剃刀链接?

How can i make image as link in razor?

推荐答案

内置帮手不能做到这一点。

The built-in helper cannot do that.

您需要创建一个普通的&LT; A HREF =@ Url.Action(...)方式&gt; 标签

You need to create an ordinary <a href="@Url.Action(...)"> tag.

这篇关于MVC3 Html.ActionLink作为图像而不是文字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆