private void ClearText(Control cParent)
{
foreach (Control c in cParent.Controls)
{
if (c.HasControls())
{
ClearText(c);
}
else
{
if (c is TextBox)
{
((TextBox)c).Text = string.Empty;
}
}
}
}
转载于:https://www.cnblogs.com/guowenbin/archive/2012/03/15/2397682.html