I assume you're having collection of items (cart items). Pass it as a model to the
View
. And use it something like this:
<ul class="dropdown-menu dropdown-cart" role="menu">
@{
foreach(var item in Model)
{
<li>
<span class="item">
<span class="item-left">
<img src="@item.ProductImgURL" alt="" />
<span class="item-info">
<span>@Model.ProductName</span>
<span>@Model.ProductPrice $</span>
</span>
</span>
<span class="item-right">
<button class="btn btn-xs btn-danger pull-right">x</button>
</span>
</span>
</li>
}
}
</ul>
-KR