I am Creating OnlineSharee Website.I have Created ThumbnailImage, I want to Display In Div tag ProductImage,ProductName and ProductPrice from Database in MVC Asp.net.How can I do it.
Please send me sample code.
Regards
Bvenkat Jeewesh
How to Dispaly ProductImage,ProductName and Price from Database in MVC Asp.net
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Mike Jonson148 pointsPosted Jul 14, 2012, 1:46 PM EDT
@model SportStore.WebUI.Models.productListViewModel
@{
ViewBag.Title = "Products";
}
@foreach (var p in Model.Products)
{
Html.RenderPartial("ProductSummary", p);
}
@Html.PageLinks(Model.PagingInfo, x => Url.Action("List",
new { page = x, category=Model.CurrentCatregory }))
Its Partitial view product summary:
@model SportStore.Domain.Entities.Product
@Model.Name
@Model.Description
@using(Html.BeginForm("AddToCart", "Cart"))
{
@Html.HiddenFor(x => x.ProductID);
@Html.Hidden("returnUrl", Request.Url.PathAndQuery);
}
@Model.Price.ToString("c")