C# - 杨涛分页控件AspNetPager
http://www.webdiyer.com/downloads/
前台
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<table border=1>
<asp:Repeater ID="Repeater1" runat="server">
<ItemTemplate>
<tr>
<td><%#DataBinder.Eval(Container.DataItem,"id")%></td>
<td><%#DataBinder.Eval(Container.DataItem,"year")%></td>
<td><%#DataBinder.Eval(Container.DataItem,"month")%></td>
<td><%#DataBinder.Eval(Container.DataItem,"day")%></td>
</tr>
</ItemTemplate>
</asp:Repeater>
</table>
<webdiyer:AspNetPager
ID="AspNetPager1"
runat="server"
Width="100%"
NumericButtonCount="6"
UrlPaging="false"
NumericButtonTextFormatString="[{0}]"
CustomInfoHTML="第 <font color='red'><b>%CurrentPageIndex%</b></font> 页
共 %PageCount% 页
显示 %StartRecordIndex%-%EndRecordIndex% 条" ShowCustomInfoSection="left"
FirstPageText="首页"
LastPageText="末页"
NextPageText="下页"
PrevPageText="上页"
Font-Names="Arial"
BackColor="#F8B500"
AlwaysShow="true"
ShowInputBox="Always"
SubmitButtonText="跳转"
SubmitButtonStyle="botton"
OnPageChanged="AspNetPager1_PageChanged" >
</webdiyer:AspNetPager>
</div>
</form>
</body>
</html>
后台
using CY.CommonLibrary.Common;
using System;
using System.Collections.Generic;
using System.Data;
public partial class _Default : System.Web.UI.Page
{
private SQLDBHelper db = new SQLDBHelper(System.Configuration.ConfigurationManager.AppSettings["connstr"]);
protected void Page_Load(object sender, EventArgs e)
{
if (!this.Page.IsPostBack)
{
BindGrid();
}
}
protected void AspNetPager1_PageChanged(object src, EventArgs e)
{
BindGrid();
}
public void BindGrid()
{
;
;
string sql = @"
declare @count int
exec dbo.pagedemo 【pageIndex】,【pageSize】,@count output
select @count
";
sql = sql.FormatByKeywords
(
new Dictionary<string, string>()
{
{ "pageIndex", pageIndex.CheckData(CheckTypez.TransferSQL, "") },
{ "pageSize", pageSize.CheckData(CheckTypez.TransferSQL, "") }
},
"【", "】"
);
DataSet ds = db.ExecuteDataSet(sql);
].Rows[][].ToNotNullString());
Repeater1.DataSource = ds.Tables[];
Repeater1.DataBind();
}
}
C# - 杨涛分页控件AspNetPager的更多相关文章
- 第三方分页控件aspnetPager出现问题解决方法
问题描述: 今天在打开以前的项目使用vs2013打开后并且生成解决方案的时候发现报错了.经过检查发现是由于第三方分页控件aspnetPager在页面上不能引用到了. 解决方法: 1. 首先将AspNe ...
- 分页控件AspNetPager学习笔记
1.AspNetPager简介 AspNetPager是一款开源.简单易用.可定制化等等各种优点的Web分页控件. 2.使用方法 1)下载AspNetPager.dll文件(http://www.we ...
- web分页控件AspNetPager的使用
首先要先引用AspNetPager.dll文件 然后在<html>上面添加下面代码: <%@ Register Assembly="AspNetPager" Na ...
- Repeater + 分页控件 AspNetPager 研究
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default3.aspx.cs ...
- 分页控件 AspNetPager的使用
1.引用AspNetPager.dll插件 1.下载AspNetPager.dll插件到bin文件夹中. 2.在“引用中添加引用”(不然报错:未能在全局命名空间中找到类型或命名名空间名称“Wuqi”) ...
- asp.net分页控件库
AspNetPager分页控件 AspNetPager分页控件解决了分页中的很多问题,直接采用该控件进行分页处理,会将繁琐的分页工作变得简单化,下面是我如何使用AspNetPager控件进行分页处理的 ...
- AspNetPager分页控件配置
AspNetPager是asp.net中常用的分页控件,下载AspNetPager.dll,添加引用,在工具栏就可以看到AspNetPager控件: 拖过来之后,设置如下属性: <webdiye ...
- AspNetPager分页控件
AspNetPager分页控件解决了分页中的很多问题,直接采用该控件进行分页处理,会将繁琐的分页工作变得简单化,下面是我如何使用AspNetPager控件进行分页处理的详细代码:1.首先到www.we ...
- AspNetPager 免费分页控件7.5.1版发布!
AspNetPager 免费分页控件7.5.1版发布,本次升级主要内容有: 修正了ShowDisabledButtons为false时html闭合标签丢失的bug:改为从System.Web.UI.W ...
随机推荐
- apache一个IP多个站点的配置方法
在日常的网站发布中很多情况下都无法做到一个IP对应一个站点,在IP4的情况下IP的资源是相对有限的.然而作为最流行的Apache自然也考虑到这种情况,那么接下来看看apache服务器怎么配置一个IP多 ...
- linux 多个文件中查找字符串
2015年2月9日 14:36:38 # find <directory> -type f -name "*.c" | xargs grep "<str ...
- centos下编译安装mysql5.5/5.6
2013年11月16日 19:39:13 centos 6 mysql 5.5.28 我只说些我出错的地方: cmake后删除的方法是 xargs rm < install_manifest.t ...
- 【JAVA、C++】LeetCode 012 Integer to Roman
Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range from 1 t ...
- HDU 4315 Climbing the Hill (阶梯博弈转尼姆博弈)
Climbing the Hill Time Limit: 1000MS Memory Limit: 32768KB 64bit IO Format: %I64d & %I64u Su ...
- HDU 4310 Hero (贪心算法)
A - Hero Time Limit:3000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Submit Sta ...
- openGL纹理映射参数解析
GLuinttexture[1]; AUX_RGBImageRec *TextureImage[1]; Status=TRUE; // Set The Status To TRUE glGenText ...
- stm32学习笔记----双串口同时打开时的printf()问题
stm32学习笔记----双串口同时打开时的printf()问题 最近因为要使用串口2外接PN532芯片实现通信,另一方面,要使用串口1来将一些提示信息输出到上位机,于是重定义了printf(),使其 ...
- ip数据结构
本文摘自 linux kernel ip.h,感谢开源的GNU struct ip { #if __BYTE_ORDER == __LITTLE_ENDIAN unsigned int ip_hl:4 ...
- 搭建邮局(邮件服务器) - hmailserver
1.查看服务器mx是否解析成功 nslookup set type=mx 2.hmailserver服务器 smtp设置 3.foxmail 设置 4.使用webmail(after ...