Add Glyphicon To Html.ActionLink() In ASP.NET MVC
Hello,
Here's how to integrate glyphicon to Html.ActionLink() helper in ASP.NET MVC. The code below will display the glyphicon shopping cart right after the text Checkout of the anchor element.
In order to add the glyphicon before the text of the anchor element, use @Url.Action() instead.
Output:
Here's how to integrate glyphicon to Html.ActionLink() helper in ASP.NET MVC. The code below will display the glyphicon shopping cart right after the text Checkout of the anchor element.
@Html.ActionLink("Checkout", "Index", "Home", null, new { @class = "btn btn-info glyphicon glyphicon-shopping-cart" })
<a href="@Url.Action("Index", "Checkout")" class="btn btn-info"> <span class="glyphicon glyphicon-shopping-cart" ></span>Checkout </a>
Comments
Post a Comment