more.aspx.cs

来自「网开商城系统网开商城系统网开商城系统网开商城系统」· CS 代码 · 共 46 行

CS
46
字号
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 + =
减小字号Ctrl + -
显示快捷键?