C#: Looping through the Controls Collections dot net controls are child controls of the form so you have to identify the name of the form first. //form2 is the name of the html form. Look at source view. foreach (Control ctrl in Page.FindControl("Form2").Controls) { if (ctrl is TextBox) ((TextBox)ctrl).Text = ""; }