首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

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

2012-02-09 
模拟点击gridview页尾分页按钮我的gridview的页尾有一分页跳转按钮btnGoC# code转到asp:TextBox IDtxtN

模拟点击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就行咯

热点排行