遇到清空大量TextBox内容的操作,操作如下:
protected void Clear(Control ctrl)
{
foreach (Control c in ctrl.Controls)
{
if (c is TextBox)
{
( ( TextBox ) ( c ) ).Text = "";
}
c.Text = "";
Clear(c);
}
}
然后调用就可以
protected void Clear(Control ctrl)
{
foreach (Control c in ctrl.Controls)
{
if (c is TextBox)
{
( ( TextBox ) ( c ) ).Text = "";
}
c.Text = "";
Clear(c);
}
}
然后调用就可以