一,用foreach:

foreach(Control cl in this.Page.FindControl("Form1").Controls)

}

二,用for循环内foreach:

for (int i = 0; i < this.Controls.Count; i++)

}

相关文章: