<td colspan="2"> <asp:DataList ID="DataList1" runat="server" RepeatColumns="5" CellPadding="5" CellSpacing="5"> <ItemStyle Width="200px" /> <ItemTemplate> <table> <tr> <td> <asp:Image ID="imgProduct" runat="server" ImageUrl='<%# Eval("Path") %>' Height="150" Width="150" /> </td> </tr> <tr> <td> Product Name : <asp:Label ID="ProductNameLabel" runat="server" Text='<%# Eval("ProductName") %>' /> </td> </tr> <tr> <td> Price : <asp:Label ID="PriceLabel" runat="server" Text='<%# Eval("Price") %>' /> </td> </tr> <tr> <td> Description : <asp:Label ID="DescriptionLabel" runat="server" Text='<%# Eval("Description") %>' /> </td> </tr> <tr> <td> <asp:LinkButton ID="LinkButton1" CommandArgument='<%# Eval("Id") %>' runat="server" OnClick="LinkButton1_Click">Add to Cart</asp:LinkButton> </td> </tr> </table> </ItemTemplate> </asp:DataList> </td>
@foreach (var item in Model) { <span> <table> <tr> <td> <img src="@Model.ImageSRC" /> </td> </tr> <tr> <td> @Model.ProductName </td> </tr> <tr> <td> @Model.Price </td> </tr> <tr> <td> @Model.Description </td> </tr> <tr> <td> @Html.ActionLink("Add to cart") </td> </tr> </table> </span> }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)