闲着没什么事情 见AspNetForums.Controls.Pager做得不错 就拿来改改 使得更通用一些
并加上了一个设计器
感谢为AspNetForums做出贡献的所有人 是你们的劳动让我的coding生活充满了乐趣.
源代码行数不少 可从这里下载 设计器可以从这里下载.
有什么问题请指教~
效果截图:

演示代码:
private void Bind_rptItem( int year, int month )
{
int totalCount;
this.postPager.PageSize = 10;
DataTable dtPosts = Post.GetPostsByYearMonth( year, month, this.postPager.CurrentPageIndex, this.postPager.PageSize,
out totalCount );
this.postPager.TotalRecords = totalCount;

this.rptPosts.DataSource = dtPosts;
this.rptPosts.DataBind( );
}
并加上了一个设计器
感谢为AspNetForums做出贡献的所有人 是你们的劳动让我的coding生活充满了乐趣.
源代码行数不少 可从这里下载 设计器可以从这里下载.
有什么问题请指教~
效果截图:
演示代码:
private void Bind_rptItem( int year, int month )
{
int totalCount;
this.postPager.PageSize = 10;
DataTable dtPosts = Post.GetPostsByYearMonth( year, month, this.postPager.CurrentPageIndex, this.postPager.PageSize, out totalCount );
this.postPager.TotalRecords = totalCount;
this.rptPosts.DataSource = dtPosts;
this.rptPosts.DataBind( );
}
浙公网安备 33010602011771号