郁闷了一个下午,解决就给分
Post post=new Post(ConfigurationSettings.AppSettings["ConnectionString"]);
DataTable dtPost=post.GetBoardPost(iBoardId);
this.DataGrid1.DataSource=dtPost;
this.DataGrid1.DataBind();
strPageCount=this.DataGrid1.PageCount.ToString();
strCurrentPage=(this.DataGrid1.CurrentPageIndex+1).ToString();
这里strPageCount始终是1!!!
页面datagrid显示正常,就是总的页数显示为1啊?气死我了~~~~