actually you need to recurse, or you will miss controls in usercontrols,
grids, etc.
walkControls(this.Controls);
void walkControls (Control c)
{
foreach (Control child in this.Controls)
{
walkControl(child);
if
(child.GetType().ToString().Equals("System.Web.UI.WebControls.TextBox")
{
// ...do something...
}
}
}
}