private void GetControls(Control c)//c需要遍历查找的父控件 { if (c is HyperLink) { Response.Write(c.ID + "<br />"); return; } if (c.HasControls()) foreach (Control con in c.Controls) GetControls(con); }