properties set:
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>
<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:
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();
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();