foreach (Control aa in this.Controls) { if (aa is TextBox ) { TextBox tb = (TextBox )aa; text = tb.Text; } }