【问题标题】:How to add icon to ActionLink in MVC如何在 MVC 中将图标添加到 ActionLink
【发布时间】:2020-04-15 22:44:39
【问题描述】:

我有 ActionLink :

 @Html.ActionLink("Text", "ActionName", "ControllerName",
             new { @class = "SomeStyle" })

现在我想用我的解决方案中的图标替换“文本”

【问题讨论】:

标签: c# html css asp.net-mvc


【解决方案1】:

使用url.Action

<a href="@Url.Action("ActionName", "ControllerName")">
        <i class="icon-pencil icon-white"></i>
       .....        
    </a>

【讨论】:

    猜你喜欢
    • 2013-10-15
    • 2012-01-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-12-04
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多