pageSize)
{ //绑定Repeater控件
products.DataSource=BLL.Product.GetProductsByCategory(int.Parse(Request.QueryString["categoryId"]),pageSize,pageIndex);
products.DataBind();
//调用Product类中的方法获得该类商品的总数
intresultCount=BLL.Product.GetProductCountByCategory(int.Parse(Request.QueryString["categoryId"]));
intcount;
//如果查询结果总数是页大小的整数倍
if(resultCount%PageSize==0)
{ count=resultCount/PageSize;
PageCount.Text=count.ToString();
}
else
{ count=resultCount/PageSize+1;
PageCount.Text=count.ToString();
}
page.Items.Clear();
//绑定页码到DropDownList控件
for(inti=0;i
上一篇:ASP_net009车辆档案管理(论文和程序)
下一篇:各路网友恶搞“聚美优品”广告词,快笑死了