the above code does check to see if there's an @ symbol , all you need is to make it suit your needs , eg:
VB Code:
[color=blue]If Not[/color] TextBox1.Text.IndexOf("@") = -1 [color=blue]Then[/color] [color=green]'/// if the string contains the @ symbol[/color] [color=green]'/// carry out your code for the string because it contains an email address.[/color] [color=blue]Else[/color] [color=green]'/// if it doesn't contain the @ symbol...[/color] MessageBox.Show("you did not type a valid email address, please try again!") [color=blue]End If[/color]





Reply With Quote