日期:2014-05-17 浏览次数:20558 次
<webdiyer:AspNetPager ID="AspNetPager1" runat="server" CssClass="paginator" CurrentPageButtonClass="cpb" CurrentPageButtonPosition="Center"
NextPageText="下一页" PrevPageText="上一页" ShowInputBox="always" PageSize="5" LastPageText="未页" FirstPageText="首页" NumericButtonCount="10"
onpagechanging="AspNetPager1_PageChanging"></webdiyer:AspNetPager>
public void BindPage(int current, string strWhrs)
{
messs.InnerHtml = mess;
int number;
if (strWhrs == null)
{
strWhrs = " IsLock=0 and L_Type=1 ";
}
number = bll.GetCount(strWhrs);//获取数据的总数
if (number == 0)
{
tishi.Style["display"] = "block";
tishi.InnerText = "很抱歉,暂无数据!";
}
else
{
tishi.Style["display"] = "none";
}
AspNetPager1.RecordCount = number;
int begin = (current - 1) * AspNetPager1.PageSize;