读书人

模拟点击gridview页尾分页按钮解决方案

发布时间: 2012-02-09 18:22:27 作者: rapoo

模拟点击gridview页尾分页按钮
我的gridview的页尾有一分页跳转按钮btnGo

C# code
转到<asp:TextBox ID="txtNewPageIndex" runat="server"                         Text="<%# ((GridView)Container.Parent.Parent).PageIndex + 1%>" Width="20px"</asp:TextBox> <asp:ImageButton ID="btnGo" runat="server" CausesValidation="False"     CommandArgument="-1" CommandName="Page" ImageUrl="~/images/go.jpg" />

现在我想通过后台代码来模拟点击这个跳转按钮以实现页面跳转效果,不知如何实现

[解决办法]
后台设置一下页码是第几页不就完事了吗?

非把问题复杂化。
[解决办法]
可以参考:
http://www.cnblogs.com/insus/articles/1417102.html
http://www.cnblogs.com/insus/articles/1417957.html
[解决办法]
是啊找到最后一页设置PageIndex就行咯

读书人网 >asp.net

热点推荐