AspNetPager控件的问题
失去乐山贼 2010-11-01 04:10:32 把AspNetPager.dll拷贝到项目的Bin文件夹中,然后我添加进去,
接着拖入该控件 <webdiyer:AspNetPager ID="anpPager" runat="server">
</webdiyer:AspNetPager>
后台绑定
if (!IsPostBack)
{
//Pager = 0;
// Databind();
DataBinds();
}
//分页
protected void DataBinds()
{
PagedDataSource pdsList = new PagedDataSource();
//对PagedDataSource对象的相关属性赋值
pdsList.DataSource = _objArticleManager.GetListArts();
pdsList.AllowPaging = true;
pdsList.PageSize = anpPager.PageSize - 5;
pdsList.AllowCustomPaging = true;
pdsList.CurrentPageIndex = anpPager.CurrentPageIndex ;
Repeater1.DataSource = pdsList;
Repeater1.DataBind();
}
运行的时候为什么看不到效果,什么都没有,不然应该要显示“<<<1 2 3 ...>>>”是不是又是母版问题?