How to add span tag inside a tag using Html.ActionLink ? Is something like this possible?
I am using ASP.NET MVC 4 along with Twitter Bootstrap version 3 .
I have a drop down menu and the HTML looks like this:
<ul class="nav navbar-nav"> <li class="@(Model.Equals("Home") ? "active" : "")"> <a href="#"> <span class="glyphicon glyphicon-home"></span> Home </a> </li> </ul>
I wanted to make the link as follows:
<li>@Html.ActionLink("Home", "Index", "Home")</li>
But in mixing things up, there is a span tag that makes it a little more complicated.
Perhaps I can also use the following:
<a href="@Url.Action("Index", "Home")"> <span class="glyphicon glyphicon-home"></span> Home </a>
Curious to know if the above is possible?
source share