1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| ...
<div class="products-holder" runat="server">
<h1><asp:Label ID="Label1" runat="server" ></asp:Label></h1>
<asp:DataList ID="DataList1" runat="server" DataKeyField="Id" DataSourceID="SqlDataSourceAtricle" RepeatColumns="3" RepeatDirection="Horizontal">
<ItemTemplate>
<div class="product">
<asp:Label ID="id" runat="server" Text='<%# Eval("Id") %>' ></asp:Label>
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" CommandArgument='<%# Eval("Id") %>' />
</div>
</ItemTemplate>
</asp:DataList>
<asp:SqlDataSource ID="SqlDataSourceArticle" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>" SelectCommand="SELECT Id FROM [Article] WHERE ([TypePrdt] = @TypePrdt)">
<SelectParameters>
<asp:Parameter DefaultValue="Cafe" Name="TypePrdt" Type="String" />
</SelectParameters>
</asp:SqlDataSource>
</div class="products-holder">
... |