国产99久久精品_欧美日本韩国一区二区_激情小说综合网_欧美一级二级视频_午夜av电影_日本久久精品视频

最新文章專題視頻專題問答1問答10問答100問答1000問答2000關鍵字專題1關鍵字專題50關鍵字專題500關鍵字專題1500TAG最新視頻文章推薦1 推薦3 推薦5 推薦7 推薦9 推薦11 推薦13 推薦15 推薦17 推薦19 推薦21 推薦23 推薦25 推薦27 推薦29 推薦31 推薦33 推薦35 推薦37視頻文章20視頻文章30視頻文章40視頻文章50視頻文章60 視頻文章70視頻文章80視頻文章90視頻文章100視頻文章120視頻文章140 視頻2關鍵字專題關鍵字專題tag2tag3文章專題文章專題2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章專題3
問答文章1 問答文章501 問答文章1001 問答文章1501 問答文章2001 問答文章2501 問答文章3001 問答文章3501 問答文章4001 問答文章4501 問答文章5001 問答文章5501 問答文章6001 問答文章6501 問答文章7001 問答文章7501 問答文章8001 問答文章8501 問答文章9001 問答文章9501
當前位置: 首頁 - 科技 - 知識百科 - 正文

repeater分頁 內容顯示

來源:懂視網 責編:小采 時間:2020-11-27 22:45:42
文檔

repeater分頁 內容顯示

repeater分頁 內容顯示:using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Drawing; using System.Web; using System.Web.SessionState; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.HtmlCon
推薦度:
導讀repeater分頁 內容顯示:using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Drawing; using System.Web; using System.Web.SessionState; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.HtmlCon

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Data.OleDb;

namespace note
{
    /// <summary>
    /// _default 的摘要說明。
    /// </summary>
    public class _default : System.Web.UI.Page
    {
        protected System.Web.UI.WebControls.Repeater rpt_sword_list;
        protected System.Web.UI.WebControls.Label lbl_count;
        protected System.Web.UI.WebControls.Label lbl_current_page;
        protected System.Web.UI.WebControls.Label lbl_total_page;
        protected System.Web.UI.WebControls.LinkButton lb_frist;
        protected System.Web.UI.WebControls.LinkButton lb_p;
        protected System.Web.UI.WebControls.LinkButton lb_n;
        protected System.Web.UI.WebControls.LinkButton lb_last;

        private void Page_Load(object sender, System.EventArgs e)
        {
            // 在此處放置用戶代碼以初始化頁面
            if(!this.IsPostBack)
            {
                this.DB_Bind();
            }
        }

        private void DB_Bind()
        {
            int ipageindex = Convert.ToInt32(this.lbl_current_page.Text);
            OleDbConnection conn = dbconn.CreateConn();
            OleDbCommand cmd = new OleDbCommand("select * from a where flag=true order by cdate desc",conn);
            OleDbDataAdapter oda = new OleDbDataAdapter();
            oda.SelectCommand = cmd;
            DataSet ds = new DataSet();
            oda.Fill(ds,"sword_list");
            PagedDataSource pds = new PagedDataSource();
            pds.DataSource = ds.Tables["sword_list"].DefaultView;
            pds.AllowPaging = true;
            pds.PageSize = 5;
            pds.CurrentPageIndex = ipageindex - 1;
            this.lbl_total_page.Text = pds.PageCount.ToString();
            this.lbl_count.Text = pds.Count.ToString();
            this.lb_frist.Enabled = true;
            this.lb_p.Enabled = true;
            this.lb_n.Enabled = true;
            this.lb_last.Enabled = true;
            if(this.lbl_current_page.Text=="1")
            {
                this.lb_frist.Enabled = false;
                this.lb_p.Enabled = false;
            }
            if(this.lbl_current_page.Text==pds.PageCount.ToString())
            {
                this.lb_n.Enabled = false;
                this.lb_last.Enabled = false;
            }
            this.rpt_sword_list.DataSource = pds;
            this.rpt_sword_list.DataBind();
            conn.Close();
        }

        #region Web 窗體設計器生成的代碼
        override protected void OnInit(EventArgs e)
        {
            //
            // CODEGEN: 該調用是 ASP.NET Web 窗體設計器所必需的。
            //
            InitializeComponent();
            base.OnInit(e);
        }

        /// <summary>
        /// 設計器支持所需的方法 - 不要使用代碼編輯器修改
        /// 此方法的內容。
        /// </summary>
        private void InitializeComponent()
        {    
            this.lb_frist.Click += new System.EventHandler(this.lb_frist_Click);
            this.lb_p.Click += new System.EventHandler(this.lb_p_Click);
            this.lb_n.Click += new System.EventHandler(this.lb_n_Click);
            this.lb_last.Click += new System.EventHandler(this.lb_last_Click);
            this.Load += new System.EventHandler(this.Page_Load);

        }
        #endregion

        private void lb_frist_Click(object sender, System.EventArgs e)
        {
            this.lbl_current_page.Text = "1";
            this.DB_Bind();
        }

        private void lb_p_Click(object sender, System.EventArgs e)
        {
            this.lbl_current_page.Text = Convert.ToString(Convert.ToInt32(this.lbl_current_page.Text)-1);
            this.DB_Bind();
        }

        private void lb_n_Click(object sender, System.EventArgs e)
        {
            this.lbl_current_page.Text = Convert.ToString(Convert.ToInt32(this.lbl_current_page.Text)+1);
            this.DB_Bind();
        }

        private void lb_last_Click(object sender, System.EventArgs e)
        {
            this.lbl_current_page.Text = this.lbl_total_page.Text;
            this.DB_Bind();
        }
    }
}

聲明:本網頁內容旨在傳播知識,若有侵權等問題請及時與本網聯系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com

文檔

repeater分頁 內容顯示

repeater分頁 內容顯示:using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Drawing; using System.Web; using System.Web.SessionState; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.HtmlCon
推薦度:
  • 熱門焦點

最新推薦

猜你喜歡

熱門推薦

專題
Top
主站蜘蛛池模板: 亚洲精品乱码久久久久久 | 亚洲一区二区三区免费观看 | 欧美日韩亚洲精品国产色 | 精品国产欧美一区二区三区成人 | 六月丁香在线观看 | 欧美日韩亚洲高清不卡一区二区三区 | 一区二区影视 | 精品国产一区二区三区香蕉 | 国产精品久久久久久一级毛片 | 亚洲精国产一区二区三区 | 久久精品国产一区二区 | 中出在线播放 | 日韩一页| 日韩欧美一区二区在线 | 欧美日韩高清完整版在线观看免费 | 久热精品视频 | 免费观看a毛片一区二区不卡 | 全部费免一级毛片不收费 | 久久精品韩国日本国产 | 玖玖国产精品 | 成人看免费一级毛片 | 日本色图在线观看 | 天堂精品高清1区2区3区 | 国产精品乱 | 欧美另类网 | 久久久91精品国产一区二区 | 国内精品视频在线播放 | 欧美精品久久久久久久久大尺度 | 亚洲国产一成人久久精品 | 国产在线观看精品一区二区三区91 | 一级毛片免费毛片毛片 | 欧美福利在线观看 | 欧美亚洲一区二区三区在线 | 一区二区三区在线视频观看 | 日韩首页 | 国产亚洲午夜精品a一区二区 | 欧美精品v日韩精品v国产精品 | 国产精品久久久久久久久鸭 | 一级成人毛片免费观看 | 国产一级一级一级成人毛片 | 亚洲欧美日韩高清一区二区一 |