惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

P
Proofpoint News Feed
博客园 - 聂微东
Application and Cybersecurity Blog
Application and Cybersecurity Blog
MyScale Blog
MyScale Blog
罗磊的独立博客
H
Help Net Security
L
LangChain Blog
T
Threat Research - Cisco Blogs
量子位
S
Securelist
Last Week in AI
Last Week in AI
L
Lohrmann on Cybersecurity
T
The Exploit Database - CXSecurity.com
P
Privacy International News Feed
The Hacker News
The Hacker News
Vercel News
Vercel News
D
Darknet – Hacking Tools, Hacker News & Cyber Security
C
Cybersecurity and Infrastructure Security Agency CISA
T
The Blog of Author Tim Ferriss
T
Threatpost
Security Latest
Security Latest
P
Palo Alto Networks Blog
Microsoft Security Blog
Microsoft Security Blog
NISL@THU
NISL@THU
F
Full Disclosure
WordPress大学
WordPress大学
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Stack Overflow Blog
Stack Overflow Blog
C
Check Point Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
酷 壳 – CoolShell
酷 壳 – CoolShell
H
Heimdal Security Blog
J
Java Code Geeks
Recorded Future
Recorded Future
Hugging Face - Blog
Hugging Face - Blog
G
GRAHAM CLULEY
Know Your Adversary
Know Your Adversary
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
阮一峰的网络日志
阮一峰的网络日志
U
Unit 42
B
Blog RSS Feed
月光博客
月光博客
C
Cisco Blogs
V
Visual Studio Blog
D
DataBreaches.Net
H
Hacker News: Front Page
博客园 - 叶小钗
N
News and Events Feed by Topic
爱范儿
爱范儿
A
Arctic Wolf

博客园 - tiger8000

winserver2012 下安装 sqlserver2008 sql 实现学生成绩并列排名算法 asp.net 一次性提交大量数据,服务器会报错,要在 web.config 中设置一下 同一服务器上多个版本的 sqlserver ,如何连接,改变某一实例的端口号 安装SQl 2008为SQL Server代理服务提供的凭据无效 winserver2008 R2 64位 企业版 , IIS 配置运行 asp+access 网站 根据不同分辨率加载不同 css 样芪表 获取屏幕分辩率及客户端信息 用 javascript 脚本,网站判读来访者是手机还是电脑 Lodop6 以上打印控件使用,详参考自带说明文档,打印样式及文字大小要特殊设置一下 win7操作系统32位或是64位系统上安装 sql2005 点滴 在后台 .cs 中执行前台的js 函数 oracle 11g 及 plsqldeveloper 相关操作 窗体程序 防止重复打开子窗体 asp 下 ewebeditor 上传图片功能,在IE7,IE8 及更高版本上失效解决方法 StringBuilder 在后台动态输出 html 代码 Oracle 建表空间 起动停止 Oracle11g 三个服务的批处理写法 C# 捕捉键盘事件
如何使用 aspnetpager
tiger8000 · 2014-07-16 · via 博客园 - tiger8000
<%@ Register assembly="AspNetPager" namespace="Wuqi.Webdiyer" tagprefix="webdiyer" %>

  <webdiyer:AspNetPager id="AspNetPager1" runat="server" ShowPageIndexBox="Always" 
                                            PageSize="20" OnPageChanged="AspNetPager1_PageChanged" 
                                            TextBeforeInputBox="转到第  " 
              TextAfterInputBox="  页  " ShowPageIndex="False" 
                                            ShowInputBox="Always" 
              ShowCustomInfoSection="Left" PrevPageText="上一页" 
                                            NextPageText="下一页" LastPageText="尾页" 
              FirstPageText="首页" AlwaysShow="True" 
                                            CustomInfoSectionWidth="600" 
              CustomInfoTextAlign="NotSet" LayoutType="Table">
      </webdiyer:AspNetPager>


    
        <webdiyer:AspNetPager ID="AspNetPager2" runat="server" CloneFrom="AspNetPager1">
        </webdiyer:AspNetPager>
 public void checkCase()
        {
            string strSql = " ID>0";
            int num = bll.GetRecordCount(strSql);
            AspNetPager1.RecordCount = num;
            DataSet ds = bll.GetAspNetPagerDataSet(strSql, AspNetPager1.CurrentPageIndex, AspNetPager1.PageSize);
            if (ds.Tables[0].Rows.Count > 0)
            {
                this.Repeater1.DataSource = ds.Tables[0].DefaultView;
                this.Repeater1.DataBind();

                AspNetPager1.CustomInfoHTML = "共:<font color=\"red\"><b>" + AspNetPager1.RecordCount.ToString() + "</b></font>&nbsp;&nbsp;条记录";
                AspNetPager1.CustomInfoHTML += " 总页数:<font color=\"red\"><b>" + AspNetPager1.PageCount.ToString() + "</b></font>&nbsp;&nbsp;页";
                AspNetPager1.CustomInfoHTML += " 每页显示:<font color=\"red\"><b>" + AspNetPager1.PageSize.ToString() + "</b></font>&nbsp;条";
                AspNetPager1.CustomInfoHTML += " 当前页:<font color=\"red\"><b>" + AspNetPager1.CurrentPageIndex.ToString() + "</b></font>&nbsp;&nbsp;";
            }
        }

 bll 

/// <summary>
        /// 获得aspnetpager分页数据
        /// </summary>
        public DataSet GetAspNetPagerDataSet(string whereSql, int mypageindex, int mypagesize)
        {
            return dal.GetAspNetPagerList(whereSql, mypageindex, mypagesize);
        }

DAL

 /// <summary>
        /// 获得AspNetPager分页数据列表
        /// </summary>
        public DataSet GetAspNetPagerList(string strWhere, int mypageindex, int mypagesize)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append(" SELECT ID,sTitle,sContent,sAuthor,sAuthorTel,sAuthorQQ,sAuthorEmail,toDepart,ifPass,PubDate ");
            strSql.Append(" FROM QuestionBook ");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            strSql.Append(" order by ID desc");
            return SQLHelper.ExecuteWebDiyerDataset(SQLHelper.DBCONNECTIONSTRING, CommandType.Text, strSql.ToString(), mypageindex, mypagesize);
        }

DBTtility

 #region 为webdiyer分页控件做的 DataSet 传递参数进来 DataSet ExecuteWebDiyerDataset(string connString, CommandType cmdType, string cmdText,int mypageindex,int mypagesize, params SqlParameter[] cmdParms)
        public static DataSet ExecuteWebDiyerDataset(string connString, CommandType cmdType, string cmdText, int mypageindex, int mypagesize, params SqlParameter[] cmdParms)
        {
            SqlDataAdapter myAdapter = new SqlDataAdapter();
            myAdapter.SelectCommand = new SqlCommand();

            using (SqlConnection conn = new SqlConnection(connString))
            {
                PrepareCommand(myAdapter.SelectCommand, conn, null, cmdType, cmdText, cmdParms);
                DataSet ds = new DataSet();
                myAdapter.Fill(ds, mypagesize * (mypageindex - 1), mypagesize, "dtable");
                myAdapter.SelectCommand.Parameters.Clear();
                return ds;

            }

        }
        #endregion