<asp:ListView ID="ListView2" runat="server" onselectedindexchanged="ListView2_SelectedIndexChanged"> <LayoutTemplate > <asp:PlaceHolder ID="itemPlaceHolder" runat="server" /> <asp:DataPager runat="server" ID="DataPager" PageSize="3"> <Fields> <asp:NumericPagerField ButtonCount="5" PreviousPageText="<--" NextPageText="-->" /> </Fields> </asp:DataPager> </LayoutTemplate> <ItemTemplate> <div class="offer_box_wide_style1"> <img src="<%# Eval("image1") %>" width="130" height="98" class="img_left" alt="" border="0"/> <div class="offer_info"> <span> <asp:Label ID="Label2" runat="server" Text='<%# Eval("title") %>'></asp:Label> Price:<asp:Label ID="Label5" runat="server" Text='<%# Eval("price") %>'></asp:Label></span> <p class="offer"> <asp:Label ID="Label4" runat="server" Text='<%# Eval("description") %>'></asp:Label> </p> <div class="more"><a href="#">...more</a></div> </div> </div> </ItemTemplate> <EmptyItemTemplate> <td id="Td1" runat="server"></td> </EmptyItemTemplate> </asp:ListView>
SqlDataAdapter da = new SqlDataAdapter(cmd, constr); DataTable table = new DataTable(); da.Fill(table); DataTable outputTable = table.Clone(); for (int i = table.Rows.Count - 1; i >= 0; i--) { outputTable.ImportRow(table.Rows[i]); } ListView2.DataSource = outputTable; ListView2.DataBind();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)