asp.net又新增了一个有用的控件,这次可是微软内置的控件了,看看下面的图,多了什么东西呢?ListView和DataPagerDataPager控件能支持实现 <asp:ListView runat="server" ID="ListView1" DataSourceID="SqlDataSource1" DataKeyNames="ProductID"> <layouttemplate> <table runat="server"> <tr runat="server"> <td runat="server"> <table id="itemContainer" runat="server" border="0" style=""> </table> </td> </tr> <tr runat="server"> <td runat="server" style=""> <asp:datapager ID="DataPager1" runat="server"> <fields> <asp:nextpreviouspagerfield ButtonType="Button" ShowFirstPageButton="True" ShowNextPageButton="False" ShowPreviousPageButton="False" /> <asp:numericpagerfield /> <asp:nextpreviouspagerfield ButtonType="Button" ShowLastPageButton="True" ShowNextPageButton="False" ShowPreviousPageButton="False" /> </fields> </asp:datapager> </td> </tr> </table> </layouttemplate> <itemtemplate> <tr runat="server" style=""> <td> ProductID: <asp:Label ID="ProductIDLabel" runat="server" Text='<%# Eval("ProductID") %>' /></td><td>ProductName: <asp:Label ID="ProductNameLabel" runat="server" Text='<%# Eval("ProductName") %>' /></td></tr> </itemtemplate> </asp:ListView> 相关文章: