protected void FindTextBox(Control c)
{
if (c.Controls != null)
{
foreach (Control x in c.Controls)
{
if (x is System.Web.UI.WebControls.TextBox)
{
((System.Web.UI.WebControls.TextBox)x).Text = “”;
}
FindTextBox(x);
}
}
}
{
if (c.Controls != null)
{
foreach (Control x in c.Controls)
{
if (x is System.Web.UI.WebControls.TextBox)
{
((System.Web.UI.WebControls.TextBox)x).Text = “”;
}
FindTextBox(x);
}
}
}
使用的时候调用:FindTextBox(this);