for(int i = 1;i < 6 ; i++)
{
   string text = (TextBox)this.FindControl("Textbox" + i.ToString());
}

解决方案 »

  1.   

    string str="";
    for(int i=1;i<6;i++)
    {
        TextBox TextBoxName=(TextBox) this.FindControl("TextBox"+i.ToString());
         str=TextBoxName.Text;
    }
    这样就能完全读出所有的TextBox的值来,存在str中。
      

  2.   

    string str="";
    for(int i=1;i<6;i++)
    {
        TextBox TextBoxName=(TextBox) this.FindControl("TextBox"+i.ToString());
         str+=TextBoxName.Text;
    }
    这样就能完全读出所有的TextBox的值来,存在str中。
      

  3.   

    string[5] aa;
    for(int i=0;i<5;i++)
       {
          TextBox TextBoxName=(TextBox) this.FindControl("TextBox"+i.ToString());
          aa[i]=TextBoxName.Text;
       }
      

  4.   

    string str="";
    for(int i=1;i<6;i++)
    {
        str = ((TextBox) this.FindControl("TextBox"+i.ToString())).Text.ToString();
         str+=TextBoxName.Text;
    }
    应该可以的
      

  5.   

    写错了
    string str="";
    for(int i=1;i<6;i++)
    {
        str = ((TextBox) this.FindControl("TextBox"+i.ToString())).Text.ToString();
        
    }
    应该可以的
      

  6.   

    for(int i = 1;i < 6 ; i++)
    {
       TextBox text = (TextBox)this.FindControl("Textbox" + i.ToString());
       string texts = text.Text;
    }