aspnetpager和datalist结合怎么使用
aspnetpager和datalist结合怎么使用,给个实例,如果用到类,请附带上类的代码,要清楚点。...
aspnetpager和datalist结合怎么使用,给个实例,如果用到类,请附带上类的代码,要清楚点。
展开
2个回答
展开全部
protected void Page_Load(object sender, EventArgs e)
{
Newmato();
}
public void Newmato()
{
int rkdhid = Convert.ToInt32(Request.QueryString["rkdhid"]);
DataView dv = sql.DV("select * from XX");
AspNetPager1.RecordCount = dv.Count;
PagedDataSource pds = new PagedDataSource();
pds.DataSource = dv;
pds.AllowPaging = true;
pds.CurrentPageIndex = AspNetPager1.CurrentPageIndex - 1;
pds.PageSize = AspNetPager1.PageSize;
datalist.DataSource = pds;
datalist.DataBind();
}
{
Newmato();
}
public void Newmato()
{
int rkdhid = Convert.ToInt32(Request.QueryString["rkdhid"]);
DataView dv = sql.DV("select * from XX");
AspNetPager1.RecordCount = dv.Count;
PagedDataSource pds = new PagedDataSource();
pds.DataSource = dv;
pds.AllowPaging = true;
pds.CurrentPageIndex = AspNetPager1.CurrentPageIndex - 1;
pds.PageSize = AspNetPager1.PageSize;
datalist.DataSource = pds;
datalist.DataBind();
}
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询