C#(.net)分页控件源码(已测试)

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

分页控件的用法

align类:

using System;

namespace MyPaperControls

{

///

/// Align 的摘要说明。

///

public enum Align

{

Center = 0,

Left = 1,

Right = 2

}

}

MyPager类:

using System;

using ponentModel;

using System.Diagnostics;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

using System.Web.UI.HtmlControls;

using System.Resources;

using System.Collections;

using System.Collections.Specialized;

using System.Text;

using System.Text.RegularExpressions;

using System.Drawing;

using pilerServices;

using MyPaperControls.Designer;

[assembly:TagPrefix("MyPaperControls", "MP")]

namespace MyPaperControls

{

[

ToolboxData("<{0}:MyPaper runat=server>"),

ValidationPropertyAttribute("Text"),

Designer(typeof(MyPaperControls.Designer.MyPaperDesigner)), DescriptionAttribute("跳转到此页面")

]

[ParseChildren(true)]

[PersistChildren(false)]

public class MyPaper : WebControl, INamingContainer,IPostBackDataHandler

{

string Pager_LinkButton_Left = "";

string Pager_LinkButton_Right = "";

string RPageNo ="";

#region============设置连接数字==========================

private string linknumberwidth = "10px";

private string linknumbercssclass = "";

private Color currentnumberbgcolor = Color.Red;

private int leftpagesize = 5;

private int rightpagesize = 5;

[Category("控件连接数字"),DefaultValue("10px"),DescriptionAttribute("获取或设置连接数字区域宽度"),NotifyParentProperty(true)]

public string LinkNumberWidth

{

get{return linknumberwidth;}

set{linknumberwidth = value;}

}

[Category("控件连接数字"),DefaultValue("20px"),DescriptionAttribute("获取或设置连接数字css样式"),NotifyParentProperty(true)]

public string LinkNumberCssClass

{

get{return linknumbercssclass;}

set{linknumbercssclass = value;}

}

[Category("控件连接数字"),DefaultValue("#FF6600"),DescriptionAttribute("获取或设置当前连接数字的背景颜色"),NotifyParentProperty(true)]

public Color CurrentNumberBgColor

{

get{return currentnumberbgcolor;}

set{currentnumberbgcolor = value;}

}

[Category("控件连接数字"),DefaultValue(5),DescriptionAttribute("设置或获取分页左边要显示的页码数"),NotifyParentProperty(true)]

public int LeftPageSize

{

get{return leftpagesize;}

set{leftpagesize = value;}

}

[Category("控件连接数字"),DefaultValue(5),DescriptionAttribute("设置或获取分页右边要显示的页码数"),NotifyParentProperty(true)]

public int RightPageSize

相关文档
最新文档