最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
asp.net List数据源之 repeater分页
时间:2022-06-25 05:03:25 编辑:袖梨 来源:一聚教程网
asp教程.net list数据源之 repeater分页
*/
///
/// 根据当前页码,每页条数,取得相应数据。
///
/// 每页显示条数
/// 当前页码
///
public static listgetpagesdata(int pagenum, int currentpage)
{
listlist = new list ();
stringbuilder sb = new stringbuilder();
sb.append("select top " + pagenum + " * from zjagzm.message where ");
sb.append("id not in (select top " + pagenum * currentpage + " id from zjagzm.message) order by uptime desc");
datatable dt = dbhelpersql.getdataset(sb.tostring(), null);
foreach (datarow row in dt.rows)
{
message ms = new message();
ms.id = convert.toint32(row["id"]);
ms.name = row["name"].tostring();
ms.title = row["title"].tostring();
ms.uptime = convert.todatetime(row["uptime"]);
ms.contents = row["contents"].tostring();
list.add(ms);
}
return list;}
相关文章
- 美团外卖年度报告在哪查看 07-06
- presentation-skills 第一次试跑和结果检查教程(新手)(skill首测版) 07-06
- 原神林尼背景立绘图鉴-原神全部角色介绍 07-06
- 我的乡村日常生活冷狐破解版下载 07-06
- gpt-image2-ppt-skills 本地安装使用教程(新手)(skill安装版) 07-06
- 《息风谷战略》鹤岭门副本流程做法介绍 07-06