700字范文,内容丰富有趣,生活中的好帮手!
700字范文 > AspNetAjaxPager Asp.Net通用无刷新Ajax分页控件 支持多样式多【PHP】

AspNetAjaxPager Asp.Net通用无刷新Ajax分页控件 支持多样式多【PHP】

时间:2023-01-11 09:15:11

相关推荐

AspNetAjaxPager Asp.Net通用无刷新Ajax分页控件 支持多样式多【PHP】

后端开发|php教程

AspNetAjaxPager,,无刷新

后端开发-php教程

Ajax

ucenter1.6头像上传破解版源码,苹果vscode没有代码提示,ubuntu无线设置,tomcat运行后404,问卷星 爬虫,php 获取调用函数,seo站外推广收费标准,政府 网站 管理系统,maccms8留言模板lzw

本控件可以对GridView,Repeater,DataGrid,DataList…几乎所有的.net数据绑定控件进行分页,全部无刷新,数据绑定部分可以使用存储过程也可以直接使用sql语句,这对本控件没有任何干扰!本控件具有较好的用户界面,能够根据需要变换各种样式,配合css控制效果则更好!

1.分页样式效果图:

2.如何使用:

于bin目录下添加:AspNetAjaxPager.dll引用

aspx文件内容:

复制代码 代码如下:

<!–

//======================================================================

// 公司名称: 野人网络工作室()

// 机器名称: WWW-BBE63F97A80

// 注册组织名: Lenovo (Beijing) Limited

// CLR版本: 2.0.50727.1433

// 文件名称: Default.aspx

// 创建者: 邵龙

// 创建时间: -4-4 16:29:49

// 程序版本: 1.0版

// 功能描述: AspNetAjaxPager使用Demo

// 修改记录:

//======================================================================

–>

AspNetAjaxPager使用Demo

电商app 源码,vscode搜索的快捷是,ubuntu 命令 返回,tomcat的安装 配置,爬虫在线兼职,php用数组求和,seo电脑培训费,答案网网站源码,织梦模板 自适应 教育加盟lzw

企业版即时通 源码,ubuntu控制进程网速,tomcat如何下载安装版,如何利用python爬虫,哈尔滨php培训机构好找工作吗,普宁seo优化lzw

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=”转到” 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.jpg” FirstLink=”img/first.jpg” LastLink=”img/last.jpg” PreviousLink=”img/previous.jpg” />

BackColor=”Transparent” BorderColor=”Red” BorderWidth=”0px” CssClass=”navi” DescriptionText=””

GotoButtonValue=”转到” IsGotoSelectVisible=”False” IsGotoTextBoxVisible=”False”

PagedControlID=”Repeater1″ RecordCount=”1500″ CurrentNumberBgColor=”Yellow” CurrentPageColor=”Lime” LinkNumberWidth=”20px” />

$(document).ready(function(){

$(“.stripe tr”).mouseover(function(){

$(this).addClass(“over”);}).mouseout(function(){

$(this).removeClass(“over”);})

$(“.stripe tr:even”).addClass(“alt”);

});

.cs文件内容:

复制代码 代码如下:

//======================================================================

// 公司名称: 野人网络工作室()

// 机器名称: WWW-BBE63F97A80

// 注册组织名: Lenovo (Beijing) Limited

// CLR版本: 2.0.50727.1433

// 文件名称: Default.aspx.cs

// 创建者: 邵龙

// 创建时间: -4-4 16:29:49

// 程序版本: 1.0版

// 功能描述: AspNetAjaxPager使用Demo

// 修改记录:

//======================================================================

using System;

using System.Data;

using System.Configuration;

using System.Web;

using System.Web.Security;

using System.Web.UI;

using System.Web.UI.WebControls;

using System.Web.UI.WebControls.WebParts;

using System.Web.UI.HtmlControls;

using System.Data.OleDb;

using AspNetAjaxPager.Delegate;

namespace Demo

{

public partial class _Default : System.Web.UI.Page

{

private OleDbConnection conn;

private OleDbCommand cmd;

protected void Page_Load(object sender, EventArgs e)

{

if (!Page.IsPostBack)

{

this.BindData(this.Pager1.CurrentPageIndex, this.Pager1.PageSize);

}

else

{

///点击分页导航时由控件代理对象触发绑定事件重新显示数据

this.Pager1.OnPageIndexChanged = new PageIndexChangedDelegate(BindData);

}

}

///

/// /// public void BindData(int PageIndex, int PageSize)

{

int intStartIndex = (PageIndex – 1) * PageSize + 1;

int intEndIndex = PageIndex * PageSize;

conn = new OleDbConnection();

conn.ConnectionString = @”Provider=Microsoft.Jet.OLEDB.4.0;Data Source=” + Server.MapPath(“~/app_data/db.mdb”);

cmd = conn.CreateCommand();

conn.Open();

///此部分可以换成存储过程分页,对控件没有任何影响

mandText = “select count(*) from students”;

int totalCount = (int)cmd.ExecuteScalar();

mandText = string.Format(“select * from students where id >= {0} and id <= {1}", intStartIndex, intEndIndex);

DataSet ds = new DataSet();

OleDbDataAdapter da = new OleDbDataAdapter(mandText, conn);

da.Fill(ds);

this.Pager1.RecordCount = totalCount;

this.Repeater1.DataSource = ds;

this.Repeater1.DataBind();

}

}

}

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。