a very good pagination server control

DownLoad

properties set: 

ContractedBlock.gif ExpandedBlockStart.gif Code
<Ke_Pager:Ke_Page ID="SoftPager" runat="server" CustomInfoHTML="共%PageCount%页,当前为第%CurrentPageIndex%页,每页%PageSize%条"
FirstPageText
="首页" LastPageText="尾页" NextPageText="下一页" OnPageChanged="SoftPager_PageChanged" PageIndexBoxType="TextBox" PrevPageText="上一页" ShowCustomInfoSection="Left" ShowPageIndexBox="Always" SubmitButtonText=" Go "TextAfterPageIndexBox="" TextBeforePageIndexBox="转到" Height="25px" NumericButtonCount="5" Width="99%" CenterCurrentPageButton="True" CustomInfoTextAlign="Left" HorizontalAlign="Right"></Ke_Pager:Ke_Page>

 

c#  code:

ContractedBlock.gif ExpandedBlockStart.gif Code
SoftPager.RecordCount = Data.SqlHelper.GetDataTable(Data.SqlHelper.GetConnectString(), CommandType.Text, "select * from softsales").Rows.Count;

string sql = string.Format("select * from (select row_number() over(order by id desc)as Row,* from softsales )temp where Row between {0} and {1} order by id desc", SoftPager.StartRecordIndex,SoftPager.EndRecordIndex);
RepSoft.DataSource 
= Data.SqlHelper.GetDataTable(Data.SqlHelper.GetConnectString(), CommandType.Text, sql);
RepSoft.DataBind();

转载于:https://www.cnblogs.com/di305449473/archive/2008/12/29/1364666.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值