<body>
<form id="form1" runat="server">
<div class="Main">
<asp:ListView ID="ListView1" runat="server" GroupItemCount="3" DataSourceID="SqlDataSource1"
SelectedIndex="3">
<LayoutTemplate>
<asp:PlaceHolder ID="groupPlaceHolder" runat="server"></asp:PlaceHolder>
</LayoutTemplate>
<GroupTemplate>
<asp:PlaceHolder ID="itemPlaceHolder" runat="server"></asp:PlaceHolder>
</GroupTemplate>
<ItemTemplate>
<div class="productItem">
<div>
<asp:Image ID="Image1" runat="server" ImageUrl='<%# Eval("Pimage") %>' />
</div>
<div>
<b>
Product Id: <%# Eval("Pid") %></b></div>
<div>
Product Name: <%# Eval("Pname") %></div>
<div>
Product cost: Rs<%# Eval("Pcost") %></div>
<asp:Button ID="Button1" runat="server" Text="Add To Cart" />
</div>
</ItemTemplate>
<ItemSeparatorTemplate>
<div class="itemSeparator">
</div>
</ItemSeparatorTemplate>
<GroupSeparatorTemplate>
<div class="groupSeparator">
</div>
</GroupSeparatorTemplate>
</asp:ListView>
</div>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:ExampleConnectionString %>"
SelectCommand="SELECT * FROM [Product]"></asp:SqlDataSource>
</form>
</body>
<form id="form1" runat="server">
<div class="Main">
<asp:ListView ID="ListView1" runat="server" GroupItemCount="3" DataSourceID="SqlDataSource1"
SelectedIndex="3">
<LayoutTemplate>
<asp:PlaceHolder ID="groupPlaceHolder" runat="server"></asp:PlaceHolder>
</LayoutTemplate>
<GroupTemplate>
<asp:PlaceHolder ID="itemPlaceHolder" runat="server"></asp:PlaceHolder>
</GroupTemplate>
<ItemTemplate>
<div class="productItem">
<div>
<asp:Image ID="Image1" runat="server" ImageUrl='<%# Eval("Pimage") %>' />
</div>
<div>
<b>
Product Id: <%# Eval("Pid") %></b></div>
<div>
Product Name: <%# Eval("Pname") %></div>
<div>
Product cost: Rs<%# Eval("Pcost") %></div>
<asp:Button ID="Button1" runat="server" Text="Add To Cart" />
</div>
</ItemTemplate>
<ItemSeparatorTemplate>
<div class="itemSeparator">
</div>
</ItemSeparatorTemplate>
<GroupSeparatorTemplate>
<div class="groupSeparator">
</div>
</GroupSeparatorTemplate>
</asp:ListView>
</div>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:ExampleConnectionString %>"
SelectCommand="SELECT * FROM [Product]"></asp:SqlDataSource>
</form>
</body>
No comments:
Post a Comment