Currently, I have the following code for a button with some text and a model variable inside a <span>
tag:
<button class="cart-icon fr btn btn-info" type="button">
Cart <span class="badge cart-count">@Model.CartCount</span>
</button>
I want to be able to link this button to the Index action of the ShoppingCart controller.
It should look like something like this, but I'm not completely sure on how to access the span tag with the html helper:
@Html.ActionLink("Cart", "Index", "ShoppingCart", new { @Model.CartCount}, new { @class = "cart-icon fr btn btn-info"})
I want to ensure I have the inside the button which holds the Model attribute of CartCount
.