记录下gridview 分页代码

  <PagerTemplate>
                            
<asp:LinkButton ID="LinkButtonFirstPage" runat="server" CommandArgument="First" CommandName="Page" 
                            Visible
="<%# ((GridView)Container.NamingContainer).PageIndex != 0 %>">First</asp:LinkButton> 
                            
<asp:LinkButton ID="LinkButtonPreviousPage" runat="server" CommandArgument="Prev" CommandName="Page" 
                            Visible
="<%# ((GridView)Container.NamingContainer).PageIndex != 0 %>">Previous</asp:LinkButton> 
                            
<asp:LinkButton ID="LinkButtonNextPage" runat="server" CommandArgument="Next" CommandName="Page" 
                            Visible
="<%# ((GridView)Container.NamingContainer).PageIndex != ((GridView)Container.NamingContainer).PageCount - 1 %>">Next</asp:LinkButton> 
                            
<asp:LinkButton ID="LinkButtonLastPage" runat="server" CommandArgument="Last" CommandName="Page" 
                            Visible
="<%# ((GridView)Container.NamingContainer).PageIndex != ((GridView)Container.NamingContainer).PageCount - 1 %>">Last</asp:LinkButton> 
                            
<asp:TextBox  ID="textBox_1" runat="server" Width="30px" ></asp:TextBox>
                            
<asp:Button ID="button_1" runat="server" Width="40px" Text="GO" OnClick="button_click" />
                            
</PagerTemplate>
posted @ 2008-06-13 10:50  TerryLove  阅读(1043)  评论(0编辑  收藏  举报