比如,我要在表格中做100个textbox,能否通过循环动态实现?

解决方案 »

  1.   

    是的
    TextBoxArray textBoxArray = new TextBoxArray(host);
    for(……)
    {
        textBoxArray.AddNewRegTextBox();
        int index = textBoxArray.Count-1;
        textBoxArray[index].Name = 
        textBoxArray[index].Left = 
        textBoxArray[index].Top = 
        ……
    }
      

  2.   

    如何把他们放在table的一列cell里呢?能否给个具体点的例子(俺是新手),比如10个textbox控件放在一个表格中的第一列。
      

  3.   

    那最好用服务器端的TABLE
    table.cell[i].controls.add(textBoxArray[index]);
      

  4.   

    table.rows[1].cell[i].controls.add(textBoxArray[index]);