<ul class="featured-box"> @foreach(var item in Model) { <li> <div class="inner"> <img src="@Url.Content(item.Image1)" width="180" height="180" alt="Shoes" /> <span class="span_head"><a href="description.html">@Html.DisplayForModel(item.ProName)</a></span> <!--<span class="desc"> Sandal Style. Heel Height - Low. Orthotic Friendly. </span>--> <span class="price">$@Html.DisplayForModel(item.Price)</span> <!--<span class="desc">Availability: <label class="red-font">In Stock</label></span>--> <a href="description.html" class="details-btn">Availability</a> <!--<a href="addtocart.html" class="cart-btn fright"><span>Add to Cart</span></a>--> </div> </li> } </ul>
public ActionResult Index() { IEnumerable<product> productlist = db.Products.ToList(); return View(productlist); }
pre
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)