代码如下: void bindData()
           {
            AspNetPager1.AlwaysShow = true;
            AspNetPager1.PageSize = 5;
            AspNetPager1.RecordCount = int.Parse(services.TotalCount()); int start = AspNetPager1.StartRecordIndex;
             int end = AspNetPager1.EndRecordIndex;
             this.m_aspLWordList_Rep.DataSource = services.SelectAll(start,end);
             this.m_aspLWordList_Rep.DataBind();
             }
           protected void AspNetPager1_PageChanged(object src, EventArgs e)
            {
            bindData();
              }

解决方案 »

  1.   

    看看services.SelectAll(start,end)这个返回多少数据。
    我的个天
      

  2.   

    this.m_aspLWordList_Rep.DataSource = services.SelectAll(start,end);
    只查询到一条数据
      

  3.   

    public DataSet SelectAll(int start, int end)
           {
               string sqlCommand = "P_GetPagedOrders";
               DbCommand dbc = SqlDB.GetStoredProcCommand(sqlCommand);
               SqlDB.AddInParameter(dbc, "@startIndex", SqlDbType.VarChar, start);
               SqlDB.AddInParameter(dbc, "@endIndex", SqlDbType.VarChar, start);
               DataSet ds = SqlDB.ExecuteDataSet(dbc);
               return ds;
           }