打印本文 打印本文 关闭窗口 关闭窗口
ASP.NET分页组件学与用——教学篇(源代码)
作者:武汉SEO闵涛  文章来源:敏韬网  点击数3349  更新时间:2009/4/23 10:41:52  文章录入:mintao  责任编辑:mintao

using System;

using System.Web.UI;

using System.Web.UI.WebControls;

using System.ComponentModel;

 

using System.Text;

 

namespace NSLzhPages

{

   

    public class LzhPages : System.Web.UI.WebControls.WebControl

    {

        private int _count;//每页显示的记录条数

        private int _currentPage;//当前页

        private int _allCount;//所有记录条数

        private int _showPages;//显示页数

 

        //以下脚本用于从文本框输入页码

        private const string SCRIPTSTRING = "<script language=''''javascript''''>\n" +

                                                " function go(ctrl,max)\n" +

                                                "         {\n" +

                                                "             if(ctrl.value >= 1 && ctrl.value <= max)\n" +

                                                "             {\n" +

                                                "                 var url;\n" +

                                                "                 var index;\n" +

                                                "                 url = location.href;\n" +

                                                "                 index = url.indexOf(''''?'''');\n" +

                                                "                 if(index == -1)\n" +

                                                "                 {\n" +

                                                "                 }\n" +

                                                "                 else\n" +

                                                "                 {\n" +

                               &nbs

[1] [2] [3] [4] [5] [6]  下一页

打印本文 打印本文 关闭窗口 关闭窗口