现在的位置: 首页 > 综合 > 正文

[ 急AspNetPager DataList 分页问题]关于分页问题,提问的的确不少,本不想发的,因为有例子,这里奉献给初学[WEB学习实例]

2013年07月07日 ⁄ 综合 ⁄ 共 558字 ⁄ 字号 评论关闭

protected void AspNetPager_PageChanged(object sender, EventArgs e)//分页导航
    {啊啊啊(a, b, c, d); }

 

    protected void 啊啊啊(string a, string b, string c, string d)//联表混合查询
    {
        AspNetPager.RecordCount = 读取数据(a,b,c,d);

 

        DataSet 啊啊= 读取数据(a,b,c,d, AspNetPager.PageSize, AspNetPager.CurrentPageIndex);
        啊啊啊啊.DataSource = 啊啊;
        啊啊啊啊.DataBind();

 

        AspNetPager.CustomInfoHTML = "当前页<font color=/"red/"><b>" + AspNetPager.CurrentPageIndex + "</b></font>/" + AspNetPager.PageCount;
        AspNetPager.CustomInfoHTML += ";每页" + AspNetPager.PageSize + "条;总" + AspNetPager.RecordCount + "条记录。";
    }

抱歉!评论已关闭.