WinForm
foreach (Control control in this.Controls) { if (control is TextBox) { (control as TextBox).Text = "Hello World."; } }
ASP.NET
foreach (Control control in this.FindControl("form1").Controls) { if (control is TextBox) { (control as TextBox).Text = "Hello world."; } }