title: C# Using String to identify/use a textbox?
body: <p>I have 6 text boxes in 6 lines, 36 in all. Line one, box one is called L1N1, line one, box two is L1N2 etc. I want to dynamically assign values to these text boxes using a string...can this be done in C#? E.g.</p>
  
  <pre><code>    private void Generate_Click(object sender, EventArgs e)
      {
          int[,] numbers = new int[6, 6];
          int lin = 0;
          while (lin &lt; 6)
          {
              lin++;
              int num = 0;
              while (num &lt; 6)
              {
                  num++;
                  Random random = new Random();
                  int randomNum = random.Next(1, 45);
                  "L" + lin + "N" + num /* &lt;--here is my string (L1N1) i want to 
                                            set my textbox(L1N1).text to a value
                                            randomNum!*/
  </code></pre>