foreach (Control c in this.Controls) { Control tempC = c as TextBox; if (tempC != null) { MessageBox.Show(((TextBox)tempC).Text); } }