http://cncode.com/SoftView.Asp?SoftID=116我的流言本源码 里边有分页的方法和你类似 .

解决方案 »

  1.   

    不用控件或只用了Table呀,其它的不用呀~~~~~,分页是能的,就是第一页的内容,在其它其始终存在,我加ds.Clear();也不行的
      

  2.   

    看这里
    http://www.mastercsharp.com/article.aspx?ArticleID=76&&TopicID=2
      

  3.   

    不行,不行,它用的是
    DataRepeater/DataList控件,我没有看看我的private void dataShow()
    {

    int StartIndex = CurrentPage*PageSize;
    string sqlStr="select * from tblSoftInfo order by iId Desc,soft_DownTime Desc";
    SqlDataAdapter da=new SqlDataAdapter(sqlStr,Conn);
    DataSet ds=new DataSet();
    da.Fill(ds,StartIndex,PageSize,"softInfo");
    Conn.Close();
    for(int i=0;i<ds.Tables["softInfo"].Rows.Count;i++)
    {
                    
    TableRow r = new TableRow();    //新增行
    r.Height=20;
    TableCell c = new TableCell();  //新列
    c.Height=20;
    c.Width=400;
    c.Controls.Add(new LiteralControl("&nbsp;"+ds.Tables["softInfo"].Rows[i]["iId"].ToString()+".<a href='softInfo.aspx?id="+ds.Tables["softInfo"].Rows[i]["iId"].ToString()+"');>"+ds.Tables["softInfo"].Rows[i]["soft_Name"].ToString()+"</a>&nbsp;"));
    r.Cells.Add(c);
    TableCell c1 = new TableCell();  //新列
    c1.Height=20;
    c1.Width=100;
    c1.Controls.Add(new LiteralControl("["+Convert.ToDateTime(ds.Tables["softInfo"].Rows[i]["soft_Date"].ToString()).ToString("yyyy-MM-dd")+"]"));
    r.Cells.Add(c1);
    Table1.Rows.Add(r);
    }
    }
      

  4.   

    没有什么MyRepeater.DataBind()之类的东东存在
      

  5.   

    在pageindexchange事件中改变currentpageindex后需要重新绑定
      

  6.   

    in Page_Load, you forgot to use
    if (!IsPostBack)
    {}