能否用一个什么容器将textbox装下
将其编成数组以便循环或有规律的进行访问

解决方案 »

  1.   

    Textox[] txt=new TextBox[2];
    for(int i=0;i<2;i++)
    {
     txt[i]=new TextBox();
    }
      

  2.   

     
    //遍历所有textBox ,并赋值
    foreach (Control c in Controls)
                {
                    TextBox t = c as TextBox;
                    if (t != null)
                    {
                        t.Text = "5";
                    }
                }