private void txt_RePassword_Leave(object sender, EventArgs e) { if (txt_RePassword.Text != "" && txt_Password.Text == txt_RePassword.Text) { EPC_pass.SetError(txt_RePassword, "correct"); EPW_pass.Clear(); allcorrect = true; } else if (txt_RePassword.Text == "" || txt_Password.Text != txt_RePassword.Text) { EPW_pass.SetError(txt_RePassword, "Cannot keep password blank and passwords should be a match"); EPC_pass.Clear(); allcorrect = false; } }
private void txt_Password_Leave(object sender, EventArgs e) { if (txt_Password.Text != "") { EPC_pass.SetError(txt_Password, "correct"); EPW_pass.Clear(); allcorrect = true; } else if (txt_Password.Text == "") { EPW_pass.SetError(txt_Password, "Cannot keep password blank"); EPC_pass.Clear(); allcorrect = false; } }