Professional Documents
Culture Documents
// funcin necesaria private bool EsEmail(string text) { Regex emailregex = new Regex("^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$"); Match mmatch = emailregex.Match(text); if (mmatch.Success) return true; else return false; }
// Ponga el cdigo en un textbox private void textBox3_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar == 13) { if (EsEmail(textBox3.Text)) { MessageBox.Show("Todo Bien"); } else MessageBox.Show("Email no vlido"); } }
Oct, 2013