Pages

About Me

My photo
ForEach(Minute in MyLife) MyExperience ++;

Tuesday, May 31, 2011

Clear All Controls Inside a form

foreach (Control ctrl in this.frm1.Controls)
{
if (ctrl is TextBox)
(ctrl as TextBox).Text="";
}
Or move all TextBoxes into Panel, Panel.Controls.Clear(); will work..

No comments:

Post a Comment