请哪位帮忙提供个AspNetPager分页存储过程的详细教程 请哪位帮忙提供个AspNetPager分页存储过程的详细教程,在网上看了几个,不是太明白,哪位有详细简单一些的发个看看,谢谢 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 控件拉进去后在后台代码写在后台代码写上 protected void Page_Load(object sender, EventArgs e) { dataBind(); } private void dataBind() { //数据绑定事例 PagedDataSource pds = new PagedDataSource(); pds.AllowPaging = true; pds.PageSize = 10; pds.DataSource = BookManager.GetAll(); if (PageIndex < 0) { PageIndex = 0; } if (PageIndex > pds.PageCount) { PageIndex = pds.PageCount; } pds.CurrentPageIndex = PageIndex; this.AspNetPager1.RecordCount = pds.DataSourceCount; Repeater1.DataSource = pds; Repeater1.DataBind(); } public int PageIndex { get { return PageIndex = Convert.ToInt32(ViewState["pageIndex"]); } set { ViewState["pageIndex"] = value; } } protected void AspNetPager1_PageChanging(object src, Wuqi.Webdiyer.PageChangingEventArgs e) { PageIndex = e.NewPageIndex; dataBind(); }但是好像到vs2008里面就不能用了... http://topic.csdn.net/u/20100224/16/0205B8B6-3A15-4C78-8BE1-EA072BE26B53.html 来点有难度的问题哦!关于判断打印机打印次数的。 折叠面板的代码,可以自由伸缩的! 谁告诉我错哪了?新手菜鸟一个 girdview 在网页中定位问题 紧急求住!!临时表找不到了 怎样得到frame的参数值--大侠请进--在线等待 孟子章,你网站上的那个收藏图标是如何实现的? 一个很不爽的问题,大家进来看看 .net c#如何验证表单,并返回? 我怎么找不到梅花雨那个日历控件,晕,搜索出来的3帖子都不是他发的:( 根据字段控制显示与否 根据字段控制显示与否
在后台代码写上
protected void Page_Load(object sender, EventArgs e)
{
dataBind(); }
private void dataBind()
{
//数据绑定事例
PagedDataSource pds = new PagedDataSource();
pds.AllowPaging = true;
pds.PageSize = 10;
pds.DataSource = BookManager.GetAll();
if (PageIndex < 0)
{
PageIndex = 0;
}
if (PageIndex > pds.PageCount)
{
PageIndex = pds.PageCount;
}
pds.CurrentPageIndex = PageIndex;
this.AspNetPager1.RecordCount = pds.DataSourceCount;
Repeater1.DataSource = pds;
Repeater1.DataBind();
}
public int PageIndex
{
get { return PageIndex = Convert.ToInt32(ViewState["pageIndex"]); }
set { ViewState["pageIndex"] = value; }
}
protected void AspNetPager1_PageChanging(object src, Wuqi.Webdiyer.PageChangingEventArgs e)
{
PageIndex = e.NewPageIndex;
dataBind();
}但是好像到vs2008里面就不能用了...