foreach (ComboBox c in this.Controls.OfType<ComboBox>())
{
if (!c.IsDisposed)
MessageBox.Show(string.Format("comboboxName is:{0} and Value is:{1}",c.Name,c.Text));
}
foreach (TextBox c in this.Controls.OfType<TextBox>())
{
if (!c.IsDisposed)
MessageBox.Show(string.Format("TextBoxName is:{0} and Value is:{1}",c.Name,c.Text));
}