Use textbox events like change, keyup, keydown, keypress events ...
private bool CheckZeroValue(Panel Container1) { foreach (Control control in Container1.Controls) { if (control is TextBox) { TextBox textBox = (control as TextBox); if (string.IsNullOrEmpty(textBox.Text.Trim())) { throw new Exception("Either Null or Empty !"); textBox.Focus(); return false; } } } return true;