title: C# read the text of dynamically created text box from other methode
body: <p>If I created a textbox dynamically like this:</p>
  
  <pre><code>private void Form1_Load(object sender, EventArgs e)
  {
     TextBox tb=new TextBox();
     ...
     this.Controls.Add(tb);
  }
  </code></pre>
  
  <p>and if I have a button on my form and I want to read the text of the textbox from within the button click event handler</p>
  
  <pre><code>private void button1_Click(object sender, EventArgs e)
  {
   if(**tb.text**=="something") do something;
  }
  </code></pre>
  
  <p>The problem is that I can't find the textbox control in the button handler.</p>
  
  <p>Thank you in advance</p>