|
-
Mar 13th, 2008, 03:12 AM
#1
Thread Starter
Lively Member
Email Validation
Hi, I need to be able to check if a email address is a valid email so people can't just type in stuff like "jfsajfsajk_jsdljdal".
My code:
If System.Text.RegularExpressions.Regex.IsMatch(Trim(txtEmail.Text), "^[a-zA-Z0-9]@{a-zA-Z0-9][\w\.-]*[a-zA-Z][a-zA-Z]*[a-zA-Z]$") = False Then
lblFeedback.Text = "Please enter a valid Email Address before submitting"
lblFeedback.ForeColor = Drawing.Color.Red
End If
But this isn't working for me, can you see where I went wrong.
Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|