protected void Button2_Click(object sender, EventArgs e)
{
    ClearInputs(Page.Controls);
}
void ClearInputs(ControlCollection ctrls)
{
    foreach (Control ctrl in ctrls)
    {
        if (ctrl is TextBox)
            ((TextBox)ctrl).Text = string.Empty;
        ClearInputs(ctrl.Controls);
    }
}

相关文章:

  • 2022-03-02
  • 2021-06-28
  • 2022-01-04
  • 2022-01-30
  • 2022-12-23
  • 2022-02-20
  • 2022-12-23
猜你喜欢
  • 2021-11-01
  • 2021-06-19
  • 2022-12-23
  • 2021-05-19
  • 2021-06-14
  • 2022-01-08
  • 2022-12-23
相关资源
相似解决方案