I searched google for something like this but didn't find any...
So am posting the one which I made here..
Function IsValidEmail(ByVal strEmail As String) As Boolean
Dim RegExp As New Regex("\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*")
Return RegExp.IsMatch(strEmail)
End Function
Now on the respective event call the function like this..
Dim boolValid As Boolean
boolValid = IsValidEmail("rajesh@nurture3.com")
Response.Write(boolValid)
Cheers
Rajesh Sivaraman.
Wednesday, January 24, 2007
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment