当前位置: 代码迷 >> ASP.NET >> AspNetPager集合repeater控件分页有关问题,ACCESS数据库
  详细解决方案

AspNetPager集合repeater控件分页有关问题,ACCESS数据库

热度:9527   发布时间:2013-02-25 00:00:00.0
AspNetPager集合repeater控件分页问题,ACCESS数据库
protected void Page_Load(object sender, EventArgs e) 

AspNetPager1.RecordCount = (int)Socut.Data.ExecuteScalar("Select count(*) From NwebCn_About"); 


private void bind() 

DataSet ds = Socut.Data.ExecuteDataSet("Select * From NwebCn_About order by Sequence asc", AspNetPager1.PageSize * (AspNetPager1.CurrentPageIndex - 1), AspNetPager1.PageSize); 
Repeater1.DataSource = ds; 
Repeater1.DataBind(); 

protected void AspNetPager1_PageChanging(object src, Wuqi.Webdiyer.PageChangingEventArgs e) 

bind(); 



我按照官方的教程,是这样写的分页代码,不过我无论点击那一页都是第一页。错误的地方应该是AspNetPager1.CurrentPageIndex的值,不过我不知道怎么修改,所以请大家帮个忙,谢谢

------解决方案--------------------------------------------------------
protected void AspNetPager1_PageChanged(object sender, EventArgs e)
是PageChanged事件吧
  相关解决方案