foreach (Control control in form1.Controls) { if (control is TextBox) (control as TextBox).Text = "111"; }