If I created a textbox dynamically like this:
private void Form1_Load(object sender, EventArgs e)
{
TextBox tb=new TextBox();
...
this.Controls.Add(tb);
}
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
private void button1_Click(object sender, EventArgs e)
{
if(**tb.text**=="something") do something;
}
The problem is that I can't find the textbox control in the button handler.
Thank you in advance