控件名后缀1,2,3,4...为数组的索引值不就完了
(control as textbox).text=arrayabc[(control as textbox).name.substring((control as textbox).name.length-1,1)]

解决方案 »

  1.   

    或者用 FindControl
    for(int i=0; i< theArray.Length; i++) {
      TextBox box = this.FindControl("Txt" + i.ToString())
      box.Text = theArray[i].ToString();
    }
      

  2.   

    使用控件数组或者使用哈希表来保存这些控件的Object,直接调用即可
      

  3.   

    做一个控件数组,然后循环。当txt和value的索引一样时,txt1.text=value1.tostring()。
    循环完了,值就给完了