<PagerTemplate>
<table width="1000px">
<tr>
<td align="left" width="30%">
<asp:Label ID="LabCurrentPage" runat="server" Font-Size="Small">当前第<%# ((GridView)Container.NamingContainer).PageIndex + 1 %>页 </asp:Label>
<asp:Label ID="LabTotalPage" runat="server" Font-Size="Small">共<%# ((GridView)Container.NamingContainer).PageCount %>页数 </asp:Label>
</td>
<td align="right" width="40%">
<asp:LinkButton ID="LinkButtonFirstPage" runat="server" CommandArgument="first" CommandName="page"
Enabled="<%# ((GridView)Container.Parent.Parent).PageIndex != 0 %>" Font-Size="Small">首页</asp:LinkButton>
<asp:LinkButton ID="LinkButtonUpPage" runat="server" CommandArgument="prev" CommandName="page"
Enabled="<%# ((GridView)Container.Parent.Parent).PageIndex != 0 %>" Font-Size="Small">上一页</asp:LinkButton>
<asp:LinkButton ID="LinkButtonDownPage" runat="server" CommandArgument="next" CommandName="page"
Enable="<%# ((GridView)Container.Parent.Parent).PageIndex != ((GridView)Container.Parent.Parent).PageCount - 1 %>"
Font-Size="Small">下一页</asp:LinkButton>
<asp:LinkButton ID="LinkButtonEndPage" runat="server" CommandArgument="end" CommandName="page"
Enable="<%# ((GridView)Container.Parent.Parent).PageIndex != ((GridView)Container.Parent.Parent).PageCount - 1 %>"
Font-Size="Small">尾页</asp:LinkButton>
</td>
</tr>
</table>
</PagerTemplate>
尾页总是报错,其他几个没问题!!!请高手指点
<table width="1000px">
<tr>
<td align="left" width="30%">
<asp:Label ID="LabCurrentPage" runat="server" Font-Size="Small">当前第<%# ((GridView)Container.NamingContainer).PageIndex + 1 %>页 </asp:Label>
<asp:Label ID="LabTotalPage" runat="server" Font-Size="Small">共<%# ((GridView)Container.NamingContainer).PageCount %>页数 </asp:Label>
</td>
<td align="right" width="40%">
<asp:LinkButton ID="LinkButtonFirstPage" runat="server" CommandArgument="first" CommandName="page"
Enabled="<%# ((GridView)Container.Parent.Parent).PageIndex != 0 %>" Font-Size="Small">首页</asp:LinkButton>
<asp:LinkButton ID="LinkButtonUpPage" runat="server" CommandArgument="prev" CommandName="page"
Enabled="<%# ((GridView)Container.Parent.Parent).PageIndex != 0 %>" Font-Size="Small">上一页</asp:LinkButton>
<asp:LinkButton ID="LinkButtonDownPage" runat="server" CommandArgument="next" CommandName="page"
Enable="<%# ((GridView)Container.Parent.Parent).PageIndex != ((GridView)Container.Parent.Parent).PageCount - 1 %>"
Font-Size="Small">下一页</asp:LinkButton>
<asp:LinkButton ID="LinkButtonEndPage" runat="server" CommandArgument="end" CommandName="page"
Enable="<%# ((GridView)Container.Parent.Parent).PageIndex != ((GridView)Container.Parent.Parent).PageCount - 1 %>"
Font-Size="Small">尾页</asp:LinkButton>
</td>
</tr>
</table>
</PagerTemplate>
尾页总是报错,其他几个没问题!!!请高手指点
解决方案 »
- 关于Asp.Net资格认证考试的若干问题
- 200分征求意见:我们的网站需求非常庞大,我全站都采用SQLHelper直接返回DataTable然后绑定Reapter的做法,没用实体类和架构,为了提高开发速度,这样做法有什么坏处没?
- 求助:网页不能直接打开
- 帮我看看我的问题,分不多。
- 询问资深或有经验的朋友关于ASP.NET 2.0是否能和ASP共存于一个服务上的意见
- 怎么用asp.net 调用orcale 的存储过程?
- 调试asp.net,出现乱码问题,请指点
- 关于SQL的一个问题,求解,急,万分感谢
- 为什么一调用office就死机?
- 在线等待,关于弹出窗体的问题!!!!!!
- 在asp.net创建cookie后,为什么在系统的cookie目录里找不到文件?
- <li>里面的<span>float以后就全部跑到<li>外面去了,请问怎么办?
CommandName="Page" CommandArgument="Last"></asp:LinkButton> case "Last":
gvTest.PageIndex = gvTest.PageCount - 1;
break;
aspnetpager控件
gvTest.PageIndex = gvTest.PageCount - 1;