I have 10 textboxes, now i want to check that none of them are empty when a button is clicked. My code is :
if (TextBox1.Text == \"\") { errorProvider1.Se
Edit:
var controls = new [] { tx1, tx2. ...., txt10 }; foreach(var control in controls.Where(e => String.IsNullOrEmpty(e.Text)) { errorProvider1.SetError(control, "Please fill the required field"); }