本控件可以对GridView,Repeater,DataGrid,DataList…几乎所有的.net数据绑定控件进行分页,全部无刷新,数据绑定部分可以使用存储过程也可以直接使用sql语句,这对本控件没有任何干扰!本控件具有较好的用户界面,能够根据需要变换各种样式,配合css控制效果则更好!
1.分页样式效果图:
2.如何使用:
于bin目录下添加:AspNetAjaxPager.dll引用
aspx文件内容:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Demo._Default" %> <BR><%@ Register Namespace="AspNetAjaxPager" TagPrefix="ajax" Assembly="AspNetAjaxPager"%> <BR> <BR><!---ecms -ecms -ecms <BR>//====================================================================== <BR>// 公司名称: 野人网络工作室(http://www.wildren.com) <BR>// 机器名称: WWW-BBE63F97A80 <BR>// 注册组织名: Lenovo (Beijing) Limited <BR>// CLR版本: 2.0.50727.1433 <BR>// 文件名称: Default.aspx <BR>// 创建者: 邵龙 <BR>// 创建时间: 2009-4-4 16:29:49 <BR>// 程序版本: 1.0版 <BR>// 功能描述: AspNetAjaxPager使用Demo <BR>// 修改记录: <BR>//====================================================================== <BR>--> <BR> <BR> <BR><title>AspNetAjaxPager使用Demo</title> <BR><link href="css/style.css" type="text/css" rel="stylesheet" /> <BR><script src="js/jquery-1.3.2.min.js" type="text/javascript"></script> <BR> <BR><body> <BR> <BR><div> <BR><div id="pannel"> <BR><div class="PagingWrapper"> <BR> <BR> <BR><table border="0" cellpadding="0" cellspacing="0" class="stripe"> <BR><tr> <BR><td>编号</td> <BR><td>姓名</td> <BR><td>年龄</td> <BR></tr> <BR> <BR> <BR><tr> <BR><td> <BR><%# Eval("id")%> <BR></td> <BR><td> <BR><%# Eval("name") %> <BR></td> <BR><td> <BR><%# Eval("age")%> <BR></td> <BR></tr> <BR> <BR> <BR></table> <BR> <BR> <BR>
BackColor=”Transparent” BorderColor=”Red” BorderWidth=”0px” DescriptionText=”当前使用中:” GotoButtonValue=”转到”
CssClass=”navi” IsGotoSelectVisible=”False” IsGotoTextBoxVisible=”False” LeftPageSize=”0″ RightPageSize=”0″ CurrentNumberBgColor=”White” />
BackColor=”Transparent” BorderColor=”Red” BorderWidth=”0px” DescriptionText=”” GotoButtonValue=”转到本文来源gao@!dai!ma.com搞$$代^@码!网!搞gaodaima代码” CssClass=”navi”
RecordCount=”1500″ IsGotoSelectVisible=”False” IsGotoTextBoxVisible=”False”/>
BackColor=”Transparent” BorderColor=”Red” BorderWidth=”0px” DescriptionText=”” GotoButtonValue=”转到” CssClass=”navi”
RecordCount=”1500″ IsGotoSelectVisible=”False”/>
BackColor=”Transparent” BorderColor=”Red” BorderWidth=”0px” CssClass=”navi” DescriptionText=””
GotoButtonValue=”转到”
PagedControlID=”Repeater1″ RecordCount=”1500″ />
BackColor=”DarkGray” BorderColor=”Red” BorderWidth=”1px” CssClass=”navi” DescriptionText=””
GotoButtonValue=”转到” IsGotoSelectVisible=”False”
PagedControlID=”Repeater1″ RecordCount=”1500″ CellSpacing=”1px” />
BackColor=”Transparent” BorderColor=”Red” BorderWidth=”0px” CssClass=”navi” DescriptionText=””
GotoButtonValue=”转到” IsGotoTextBoxVisible=”False”
PagedControlID=”Repeater1″ RecordCount=”1500″ LinkIsText=”False” NextLink=”img/next.gif” FirstLink=”img/first.gif” LastLink=”img/last.gif” PreviousLink=”img/previous.gif” />
BackColor=”Transparent” BorderColor=”Red” BorderWidth=”0px” CssClass=”navi” DescriptionText=””
GotoButtonValue=”转到” IsGotoSelectVisible=”False” IsGotoTextBoxVisible=”False”
PagedControlID=”Repeater1″ RecordCount=”1500″ CurrentNumberBgColor=”Yellow” CurrentPageColor=”Lime” LinkNumberWidth=”20px” />