再发一个好用的控件,顺便散分(分页控件)
前端时间开发的分页控件,满足不了现在的需求,因为涉及到 Url 重写,于是乎,又发一个,顺便散分,最近沉迷T-SQL,很久没有过来了 ,我是采用的 url 分页,用的 存储过程分页方式 ,这个 只是 用于 将 你的 显示翻页 好看一点的 来着~
先发个看看
(这两天,生病了,所以来csdn .今天老板放我假~哈哈)
[code=C#]using System;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Text.RegularExpressions;
using System.Web.UI;
/// <summary>
///PagerControl 的摘要说明
/// </summary>
namespace YSMV.Control
{
public class UrlRewritePagerControl : System.Web.UI.UserControl
{
#region Parmeter
private string rx;
private Regex reg;
private int _pageSize = 10, _pageCount, _pageIndex = 1, _totalCount = 0, _groupNum = 5;
private string sendToUrl, queryPage = "page ", _matchFirst = "$1 ", _matchLast = "$2 ", _link = " ";
private bool _smart = false;
#endregion
#region HTML
private const string divstart = " <div class= 'digg '> ";
private const string divend = " </div> ";
private const string prepage = " <span class= 'disabled '> ";
private const string nextpage = " <span class= 'disabled '> ";
private const string currentpage = " <span class= 'current '> ";
private const string endspan = " </span> ";
private const string astart = " <a href= ' ";
private const string ahrefend = " ' title= ' ";
private const string aaltend = " '> ";
private const string aover = " </a> ";
private const string prev = "< ";
private const string next = "> ";