DAL层如:
public static IList<Hotel> select_hBorough_View(int city_Id)
{ List<Hotel> list = new List<Hotel>();
string sql = "select hBorough from Hotel where hBelongCity=@city_Id ";
SqlParameter[] parameters = {
new SqlParameter("@city_Id", SqlDbType.Int,4)};
parameters[0].Value = city_Id; DataTable table = DBHress.getDataSet(sql, parameters);
foreach (DataRow row in table.Rows)
{
Hotel h = new Hotel();
h.HBorough = (string)row["hBorough"];
list.Add(h);
}
return list;
}BLL 层就省了吧
页面的cs
也就这样 this.Repeater1.DataSource = Tickets_Service.select_hBorough_View();
this.Repeater1.DataBind();
谁可以教我怎么在这里用 AspNetPager控件
public static IList<Hotel> select_hBorough_View(int city_Id)
{ List<Hotel> list = new List<Hotel>();
string sql = "select hBorough from Hotel where hBelongCity=@city_Id ";
SqlParameter[] parameters = {
new SqlParameter("@city_Id", SqlDbType.Int,4)};
parameters[0].Value = city_Id; DataTable table = DBHress.getDataSet(sql, parameters);
foreach (DataRow row in table.Rows)
{
Hotel h = new Hotel();
h.HBorough = (string)row["hBorough"];
list.Add(h);
}
return list;
}BLL 层就省了吧
页面的cs
也就这样 this.Repeater1.DataSource = Tickets_Service.select_hBorough_View();
this.Repeater1.DataBind();
谁可以教我怎么在这里用 AspNetPager控件
解决方案 »
- 一个动态生成DataTable的问题(帮我解决的我会再给你一百分)
- 我真的不会,我快疯了
- 前来请教一个实体bean传参数的问题.3Q.
- 关于用dataset做数据源的gridview改变标题的问题
- asp.net到底怎么了,世界怎么了,为什么会这样.
- menu的navigateurl不能带参数?
- 关于repeater数据排序的问题
- 高手指点如何向SQL数据库中插入空值啊,现在的问题是有数据库中有一个DateTime字段,我要是向其中插入NULL用Insert怎么实现
- 满地打滚求救急!!
- 花400多分,问7,8次,问题依然没解决,高手请进来(思归,你不要走吗?回答完再走,给你送行)
- .Net截取字符串影响布局
- 关于模板列中条件运算穿插js取值的问题...
官网http://www.webdiyer.com/
记得里面有个关于多层分页的例子,无非就是传入几个参数,当前页,起始页,或末页什么的