复制代码 代码如下:
private void ClearAllText(System.Web.UI.Control contrl)
{
int ctl_count=contrl.Controls.Count;
for (int i=0;i<ctl_count;i )
{
foreach(Control ctl in contrl.Controls[i].Controls)
{
if (ctl.HasControls())
{
ClearAllText(ctl.Parent);
}
else
{
if (ctl is TextBox)
(ctl as TextBox).Text="";
}
}
}
}
复制代码 代码如下:
ClearAllText(this.Page);
新闻热点
疑难解答
图片精选