📄 more.aspx.cs
字号:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Wuqi.Webdiyer;
public partial class more : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
bind();
}
public void bind()
{
Product pr = new Product();
int q = Convert.ToInt32(Request.Params["type"].ToString());
this.AspNetPager1.RecordCount = pr.GetTypeall(q).Rows.Count;
this.HotProduct.DataSource = pr.GetTypeall(q,12*(this.AspNetPager1.CurrentPageIndex-1),12).DefaultView;
this.HotProduct.DataBind();
//2*(this.AspNetPager1.CurrentPageIndex-1) 一下页从那条记录开始,2提取的记录最大数也就是分页的条数
}
protected void HotProduct_ItemCommand(object source, DataListCommandEventArgs e)
{
}
protected void AspNetPager1_PageChanging(object src, PageChangingEventArgs e)
{
this.AspNetPager1.CurrentPageIndex = e.NewPageIndex;
bind();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -