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

0 comments:

Post a Comment

Online Casino