<%@ Register TagPrefix="Custom" Assembly="Microsoft.Pager.Controls" Namespace="Microsoft.Pager.Controls" %>
<div class="pagination">
<Customager ID="pager" PageSize="20" PageNumberFormatText="{0}" FirstButtonText="首页"
NextButtonText="下一页" PreviousButtonText="上一页" LastButtonText="尾页" runat="server"></Customager>
</div>
protected List<Tuple<int, string, DateTime>> pagerList = new List<Tuple<int, string, DateTime>>();
protected void Page_Load(object sender, EventArgs e)
{
PagerBind();
}
protected void PagerBind()
{
int pageIndex = pager.PageIndex + 1;
int pageSize = pager.PageSize;
int totalRecods=0;
pagerList = this.InitList(pageIndex, pageSize, out totalRecods);
pager.TotalRecords = totalRecods;
}
protected void Pager_IndexChanged(object sender, EventArgs e)
{
PagerBind();
}
欢迎光临 苏飞论坛 (http://www.sufeinet.com/) | Powered by Discuz! X3.4 |