日期:2014-05-17 浏览次数:20635 次
protected void Page_Load(object sender, EventArgs e)
{
GetCheckBoxID(this.Page);
}
protected void GetCheckBoxID(Control control)
{
foreach (Control ctl in control.Controls)
{
if (ctl is CheckBox)
Response.Write(ctl.ID + "<br/>");
if (ctl.HasControls())
GetCheckBoxID(ctl);
}
}
------解决方案--------------------