3
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by Shilpakmthn
0

I found the solution like this,

EmptyTextBoxValues(this);
private void EmptyTextBoxValues(Control parent)
    {
        foreach (Control c in parent.Controls)
        {
            if ((c.Controls.Count > 0))
            {
                EmptyTextBoxValues(c);
            }
            else if ((c.GetType() == typeof(TextBox)))
            {
                ((TextBox)(c)).Text = "";
            }
            
        }
    }
0

the best and easiest way is to write a single event handler for all textboxes on the form

0

MAke a linkbutton with name 'clear'
on its button event handler just blank all text boxes resides on the page.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.