AspNetAjaxPager,Asp.Net通用无刷新Ajax分页控件,支持多样式多数据绑定
本控件可以对GridView,Repeater,DataGrid,DataList...几乎所有的.net数据绑定控件进行分页,全部无刷新,数据绑定部分可以使用存储过程也可以直接使用sql语句,这对本控件没有任何干扰!本控件具有较好的用户界面,能够根据需要变换各种样式,配合css控制效果则更好!
1.分页样式效果图:
2.如何使用:
于bin目录下
添加:AspNetAjaxPager.dll引用
aspx
文件内容:
<div class="codetitle">
<a style="CURSOR: pointer" data="20342" class="copybut" id="copybut20342" onclick="doCopy('code20342')"> 代码如下: <div class="codebody" id="code20342">
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Demo._Default" %>
<%@ Register Namespace="AspNetAjaxPager" TagPrefix="ajax" Assembly="AspNetAjaxPager"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
AspNetAjaxPager使用Demo <script src="js/jquery-1.3.2.min.js" type="text/javascript">
<form id="form1" runat="server">
<div id="pannel">
<div class="PagingWrapper">
<asp:Repeater ID="Repeater1" runat="server">
<table border="0" cellpadding="0" cellspacing="0" class="stripe">
<tr>
<td>编号</td>
<td>姓名</td>
<td>年龄</td>
</tr>
<tr>
<td>
<%# Eval("id")%>
</td>
<td>
<%# Eval("name") %>
</td>
<td>
<%# Eval("age")%>
</td>
</tr>
</table>
</asp:Repeater>
<ajax:AjaxPager ID="Pager1" runat="server" AjaxContainerID="pannel" PagedControlID="Repeater1" Align="left"
BackColor="Transparent" BorderColor="Red" BorderWidth="0px" DescriptionText="当前使用中:" GotoButtonValue="转到"
CssClass="navi" IsGotoSelectVisible="False" IsGotoTextBoxVisible="False" LeftPageSize="0" RightPageSize="0" CurrentNumberBgColor="White" />
<ajax:AjaxPager ID="AjaxPager1" runat="server" AjaxContainerID="pannel" PagedControlID="Repeater1" Align="left"
BackColor="Transparent" BorderColor="Red" BorderWidth="0px" DescriptionText="" GotoButtonValue="转到" CssClass="navi"
RecordCount="1500" IsGotoSelectVisible="False" IsGotoTextBoxVisible="False"/>
<ajax:AjaxPager ID="AjaxPager2" runat="server" AjaxContainerID="pannel" PagedControlID="Repeater1" Align="left"
BackColor="Transparent" BorderColor="Red" BorderWidth="0px" DescriptionText="" GotoButtonValue="转到" CssClass="navi"
RecordCount="1500" IsGotoSelectVisible="False"/>
<ajax:AjaxPager ID="AjaxPager3" runat="server" AjaxContainerID="pannel" Align="left"
BackColor="Transparent" BorderColor="Red" BorderWidth="0px" CssClass="navi" DescriptionText=""
GotoButtonValue="转到"
PagedControlID="Repeater1" RecordCount="1500" />
<ajax:AjaxPager ID="AjaxPager4" runat="server" AjaxContainerID="pannel" Align="left"
BackColor="DarkGray" BorderColor="Red" BorderWidth="1px" CssClass="navi" DescriptionText=""
GotoButtonValue="转到" IsGotoSelectVisible="False"
PagedControlID="Repeater1" RecordCount="1500" CellSpacing="1px" />
<ajax:AjaxPager ID="AjaxPager5" runat="server" AjaxContainerID="pannel" Align="left"
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" />
<ajax:AjaxPager ID="AjaxPager6" runat="server" AjaxContainerID="pannel" Align="left"
BackColor="Transparent" BorderColor="Red" BorderWidth="0px" CssClass="navi" DescriptionText=""
GotoButtonValue="转到" IsGotoSelectVisible="False" IsGotoTextBoxVisible="False"
PagedControlID="Repeater1" RecordCount="1500" CurrentNumberBgColor="Yellow" CurrentPageColor="Lime" LinkNumberWidth="20px" />