I have the following code to validate the email. It worked well if only simple text is entered. But when I am entering the partial text say test@ only it doesn't throws exception. Can you please guide me what am I missing.
Try
Dim M As New System.Net.Mail.MailAddress(Txt_Email.Text)
Catch ex As FormatException
MsgBox(ex.Message, MsgBoxStyle.Critical + MsgBoxStyle.OkOnly)
Txt_Email.Text = string.Empty
Exit Sub
End Try
Thanks in Adavance
Omer