public void ClearAllTextBox(ControlCollection ctrls)
{
foreach (Control ctrl in ctrls)
{
if (ctrl is TextBox)
((TextBox)ctrl).Text = string.Empty;
ClearAllTextBox(ctrl.Controls);
}
}
Use the code below in click event
ClearAllTextBox(Page.Controls);
{
foreach (Control ctrl in ctrls)
{
if (ctrl is TextBox)
((TextBox)ctrl).Text = string.Empty;
ClearAllTextBox(ctrl.Controls);
}
}
Use the code below in click event
ClearAllTextBox(Page.Controls);