title: dynamically create multiple textboxes C#
body: <p>This is my code. 
  But all my textboxes's value is just null.</p>
  
  <pre><code>    public void createTxtTeamNames()
      {
          TextBox[] txtTeamNames = new TextBox[teams];
          int i = 0;
          foreach (TextBox txt in txtTeamNames)
          {
              string name = "TeamNumber" + i.ToString();
              txt.Name = name;
              txt.Text = name;
              txt.Location = new Point(172, 32 + (i * 28));
              txt.Visible = true;
              i++;
          }
      }
  </code></pre>
  
  <p>Thanks for the help.</p>