具体应该怎么写呢
怎么和我页面上aspx.cs中的数据联系起来呢

解决方案 »

  1.   

    貌似这样写,
    //绑定数据
    private void BindData()
    {

    //创建一个数据集
    DataTable dtTmp = new DataTable();
    string strError = string.Empty;
    //读取XML文件用于绑定到DataGrid上
    dtTmp = this.XmlBind("123.xml",ref strError);
    if(strError.Length > 0)
    {
    return;
    }
             PageCount = Convert.ToInt32(Math.Ceiling(Convert.ToDouble(dtTmp .Rows.Count) / Convert.ToInt32(dtTmp .PageSize)));

    labPageCount.Text = PageCount.ToString();
             ...
    dataGrid.DataSource = dtTmp.DefaultView;
    dataGrid.DataBind();
    ...
    }
    翻页事件:
    private void lbtnPageLast_Click(object sender, System.EventArgs e)
    {
    this.CurrentPageIndex=PageCount;
             BindData();
    }
      

  2.   

    strError是干什么的阿?
    this.XmlBind没有这个方法阿!