Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 42457

visual basic email format

$
0
0
How do I check the textbox if it is using email format like @yahoo.com @gmail.com or other email services? Let say


Email: thisisatest@yahoo.com

If valid then do nothing.. else this text should popup "Please enter valid entry" my code

Code:

    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
        If TextBox1.Text.Trim() = "" Then
            MessageBox.Show("Please, enter valid entry!")
        Else
            Timer1.Start()
        End If
    End Sub

As you can see I've already made a trim so that It would not allow whitespaces. The only thing that I wanted is. ONLY allow email with @'s.

Viewing all articles
Browse latest Browse all 42457


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>