C# - Clear all inputbox after submit

you need to create a function and call this function after submit or call whenever you need it.
protected void CancelButton_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);
    }
}