title: Using dynamically created controls in C#
body: <p>I am creating an application where a user will input grades and the program will output the weighted average. On load, it will ask for the number of categories for the assignments. The program will then dynamically create textboxes for the user to input information. The problem is that I can not figure out how to read the text that is inputed after I create the textboxes. Here is my code:</p>
  
  <pre><code>            TextBox txtbx = new TextBox();
              txtbx.Text = "";
              txtbx.Name = "txtbx1";
              txtbx.Location = new Point(10, 10);
              txtbx.Height = 20;
              txtbx.Width = 50;
              Controls.Add(txtbx);
  </code></pre>
  
  <p>How can I change this code so I can find the current text in the box when the user submits?</p>