|
-
Oct 27th, 2005, 12:37 PM
#1
Thread Starter
Hyperactive Member
Manually Check Email Address Validity
I am validating an online form, and naturally one of the fields to validate is an email address.
Does anybody have a function available that checks the validay of a string to be a valid email address?
Unfortunately I need a bit more flexibility than is provided by the RegularExpressionValidator object - unless I can somehow call it without hard binding it (if that makes sense).
I can see that the following is used by this control as the Email format:
\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*
Any ideas?
Last edited by stingrae; Oct 27th, 2005 at 09:19 PM.
Reason: Resolved
"The passion lives to keep your faith, though all are different, all are great" ... Michael Hutchence 1960-1997.
Windows & Web Developer
Specialising in Visual Basic .Net & Client Server Programming & Client/Customer Relations Databases
Sutherland Shire, Sydney Australia
www.stingrae.com.au
Developer of Arnold - Gym & Martial Arts Database Management System
www.gymdatabase.com.au
-
Oct 27th, 2005, 06:32 PM
#2
Re: Manually Check Email Address Validity
What is the additional flexibility that you need? Are you trying to limit domains or something like that?
-
Oct 27th, 2005, 08:30 PM
#3
Thread Starter
Hyperactive Member
Re: Manually Check Email Address Validity
No, I just want to be able to check from within a code block. Like if strXYZ is aValidEmail then do suchandsuch .... i don't actually want to validate a text box...
"The passion lives to keep your faith, though all are different, all are great" ... Michael Hutchence 1960-1997.
Windows & Web Developer
Specialising in Visual Basic .Net & Client Server Programming & Client/Customer Relations Databases
Sutherland Shire, Sydney Australia
www.stingrae.com.au
Developer of Arnold - Gym & Martial Arts Database Management System
www.gymdatabase.com.au
-
Oct 27th, 2005, 08:38 PM
#4
Re: Manually Check Email Address Validity
You would just use a System.Text.RegularExpressions.Regex object with the same regular expression.
-
Oct 27th, 2005, 09:19 PM
#5
Thread Starter
Hyperactive Member
Re: Manually Check Email Address Validity
cool... thanks. i had never seen that before and was just what i was after....
R
ps.... takes another aussie to solve my prob. cheers mate!
"The passion lives to keep your faith, though all are different, all are great" ... Michael Hutchence 1960-1997.
Windows & Web Developer
Specialising in Visual Basic .Net & Client Server Programming & Client/Customer Relations Databases
Sutherland Shire, Sydney Australia
www.stingrae.com.au
Developer of Arnold - Gym & Martial Arts Database Management System
www.gymdatabase.com.au
-
Oct 27th, 2005, 09:26 PM
#6
Re: Manually Check Email Address Validity
My ex-wife actually went to the same school as Micheal Hutchence. He's practically my brother. I don't know Kevin Bacon though.
-
Oct 28th, 2005, 06:57 AM
#7
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
|