private void PasswordTextBox1_Leave(object sender, EventArgs e) { if (PasswordTextBox1.Text.Trim() == "") { PasswordCueText1.Show(); } else { if (IsNumAndEnCh(PasswordTextBox1.Text) == false) { PWD1AlertLabel.Show(); if (PasswordTextBox1.Text != PasswordTextBox2.Text && PasswordTextBox2.Text != "" && PWD2AlertLabel.Visible == false) { PWD2AlertLabel.Show(); } } else { if (PasswordTextBox1.Text == PasswordTextBox2.Text && PWD2AlertLabel.Visible == true) { PWD2AlertLabel.Hide(); } else if (PasswordTextBox1.Text != PasswordTextBox2.Text && PasswordTextBox2.Text != "" && PWD2AlertLabel.Visible == false) { PWD2AlertLabel.Show(); } PWD1AlertLabel.Hide(); PasswordCueText1.Hide(); } } }
private void PasswordTextBox1_Enter(object sender, EventArgs e) { if (PasswordTextBox1.Text.Trim() == "") { PasswordCueText1.Hide(); } else if (PasswordTextBox1.Text.Trim() != "" && PasswordCueText1.Visible == false) { PasswordCueText1.Hide(); } }