VBForums.com - C# - Clear a container of controls quickly.: "public void ClearControlValues(System.Windows.Forms.Control Container)
{
	try
	{
		foreach(Control ctrl in Container.Controls)
		{
			if(ctrl.GetType() == typeof(TextBox))
				((TextBox)ctrl).Text = '';
			if(ctrl.GetType() == typeof(ComboBox))
				((ComboBox)ctrl).SelectedIndex = -1;
			if(ctrl.GetType() == typeof(CheckBox))
				((CheckBox)ctrl).Checked = false;
			if(ctrl.GetType() == typeof(Label))
				((Label)ctrl).Text = '';
			if(ctrl.GetType() == typeof(DateTimePicker))
				((DateTimePicker)ctrl).Text = '';
                         if(ctrl.Controls.Count>0)
                               ClearControlValues(ctrl);
		}
	}
	catch(Exception ex)
	{
		MessageBox.Show(ex.ToString());
	}
}"
