private void txtcmpname_Validating(object sender, CancelEventArgs e) { if (((TextBox)sender).Text == "") { MessageBox.Show("You must enter a ccomplaintname.", "Invalid Input", MessageBoxButtons.OK, MessageBoxIcon.Warning); e.Cancel = true; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)