I currently have the following MVC code.
<li>@Html.ActionLink("Home", "Index", "Home")</li>
This generates the following HTML code
<li>
<a href="/"></a>
</li>
How Can I obtain the following HTML code?
<a href="#">
<i class="icon-home icon-white"></i>
Home
</a>
The Solution is to use the Url.Action Method.
<li>
<a href="@Url.Action("Index", "Home")">
<i class="glyphicon glyphicon-home"></i> Home
</a>
</li>
Hopefully it helps others.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With