复制代码 代码如下:
for (int i = 0; i < this.controls.count; i++)
{
foreach (system.web.ui.control control in this.controls[i].controls)
{
if (control is textbox)
(control as textbox).text = "";
}
}
foreach (control cl in this.page.findcontrol("form1").controls)
{
if (cl.gettype().tostring() == "system.web.ui.webcontrols.textbox")
{
((textbox)cl).text = "";
}
}
您可能感兴趣的文章:
如您对本文有疑问或者有任何想说的,请点击进行留言回复,万千网友为您解惑!
网友评论