Posted on 2008-03-27 22:44
玄铁剑 阅读(357)
评论(0) 编辑 收藏 引用 所属分类:
ASP.NET相关
<PagerTemplate>
<asp:Label ID="lblPage" runat="server" Text="Page:" ForeColor="blue"></asp:Label>
<asp:Label ID="lblCurrentPage" runat="server" Font-Bold="true" Text="<%# ((GridView)Container.NamingContainer).PageIndex + 1 %>"
ForeColor="red"></asp:Label>/
<asp:Label ID="lblPageCount" runat="server" Font-Bold="true" Text="<%# ((GridView)Container.NamingContainer).PageCount %>"
ForeColor="black"></asp:Label>
<asp:LinkButton ID="lbtnFirstPage" runat="server" CommandName="Page" CommandArgument="First" Text="First"
Enabled="<%# ((GridView)Container.NamingContainer).PageIndex != 0 %>"></asp:LinkButton>
<asp:LinkButton ID="lbtnPreviousPage" runat="server" Enabled="<%# ((GridView)Container.NamingContainer).PageIndex != 0 %>" Text="Prev"
CommandName="Page" CommandArgument="Prev"></asp:LinkButton>
<asp:LinkButton ID="lbtnNextPage" runat="server" CommandName="Page" CommandArgument="Next" Text="Next"
Enabled="<%# ((GridView)Container.NamingContainer).PageIndex != ((GridView)Container.NamingContainer).PageCount - 1 %>"></asp:LinkButton>
<asp:LinkButton ID="lbtnLastPage" runat="server" CommandName="Page" CommandArgument="Last" Text="Last"
Enabled="<%# ((GridView)Container.NamingContainer).PageIndex != ((GridView)Container.NamingContainer).PageCount - 1 %>"></asp:LinkButton>
</PagerTemplate>
<PagerStyle CssClass="GridPager" HorizontalAlign="Center"/>