Friday, February 15, 2013

get all the textboxes in a web form

List<TextBox> textBoxes = form1.Controls.Cast<Control>().Where(control =>
      control.GetType() == typeof (TextBox)).Cast<TextBox>().ToList();

No comments:

Post a Comment