I want to display an image for each bike, but these codes didn't work:
<ul>
@foreach (var bike in Model.Bikes)
{
<li>@Html.ActionLink(bike.Name, "Categories", new { id = bike.Id, name = bike.Name, @class = "image"}, null)</li>
}
</ul>
Anybody can help me with this, thanks a lot!
I just updated my CSS file:
a.image {
background: url('~/Store Project(new)/Store Project/AdventureCycle/Content/Images/') no-repeat center right;
display: block;
height: 84px;
width: 264px;
}