试试在页面上放两个TextBox,ID分别为txt1,txt2

解决方案 »

  1.   

    txt1 is a variable, to use FindControl, you need to assign the ID property, for example
    System.Web.UI.WebControls.TextBox txt1=new System.Web.UI.WebControls.TextBox();
    txt1.Text="chenwd";
                               txt1.ID = "txt1"; qxcells.Controls.Add(txt1);
    qxrows.Cells.Add(qxcells);
    this.Table1.Rows.Add(qxrows); System.Web.UI.WebControls.TextBox txt2;
    txt2=(System.Web.UI.WebControls.TextBox )Table1.FindControl("txt1");
    this.Label1.Text=txt2.ID;
      

  2.   

    table 不是服务端控件,你在客户端在TABLE那边加上 runat=server就可以了