我尝试在导航栏中设置带有ActionLink的glyphicon-home。实际上我发现了一个类似的案例,但它与href一起工作。 这是我的代码
<ul class="nav navbar-nav">
<li>@Html.ActionLink("Index", "manage")
<i class="glyphicon glyphicon-home"></i>
Start</li>
<li>@Html.ActionLink("Kontakt", "Contact", "Home")</li>
</ul>
感谢
答案 0 :(得分:1)
我该怎么做,
<li>
<a href="@Url.Action("Index", "Manage")">
<i class="glyphicon glyphicon-home"></i> //You can add text here too
</a>
</li>
希望有所帮助:)
答案 1 :(得分:0)
试试这个
@Html.ActionLink("Index", "Manage", new {@class = "glyphicon glyphicon-home})
答案 2 :(得分:0)
试试这个:
@Html.ActionLink("Start","Index", "Manage", new {@class = "glyphicon glyphicon-home"})