title: How to find a text box by name and write its contents to a text file
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/4483912/find-a-control-in-c-sharp-winforms-by-name">Find a control in C# winforms by name</a>  </p>
  </blockquote>
  
  
  
  <p>I will try to explain it.. So I have a for loop, and each time I want to load the textbox number equal with the cycle integer.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>for(int i=1 ; i&lt;=indulok+1 ; i++)
  {
      StreamWriter sw = new StreamWriter("futamok/"+comboBox1.Text + "/" + indulok + ".txt");
      sw.WriteLine(textBox1.Text);
      sw.Dispose();
  }
  </code></pre>
  
  <p>Now I want to replace textBox1.Text to something like this:</p>
  
  <pre><code>sw.WriteLine(textBox + i + .Text);
  </code></pre>
  
  <p>But this is not working of course.</p>