473,402 Members | 2,064 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

Check if variable value is a valid email.

Hello,

I have an aspx.vb code with a function.
In this function I need to check if a variable is a valid email address.

Something like: ad*****@domain.extension

How can I do this?

Thanks,
Miguel
Nov 19 '05 #1
3 1739
Hi Miguel:

You can use a RegEx Validation control. Here is a walkthorugh to get
started with:
http://support.microsoft.com/default...b;en-us;316662

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Mon, 9 May 2005 23:29:02 +0000, "Shapper"
<mdmoura*NOSPAM*@gmail.*DELETE2SEND*com> wrote:
Hello,

I have an aspx.vb code with a function.
In this function I need to check if a variable is a valid email address.

Something like: ad*****@domain.extension

How can I do this?

Thanks,
Miguel


Nov 19 '05 #2
On Mon, 09 May 2005 20:07:46 -0500, Scott Allen
<sc***@nospam.odetocode.com> wrote:
Hi Miguel:

You can use a RegEx Validation control. Here is a walkthorugh to get
started with:
http://support.microsoft.com/default...b;en-us;316662

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Mon, 9 May 2005 23:29:02 +0000, "Shapper"
<mdmoura*NOSPAM*@gmail.*DELETE2SEND*com> wrote:
Hello,

I have an aspx.vb code with a function.
In this function I need to check if a variable is a valid email address.

Something like: ad*****@domain.extension

How can I do this?

Thanks,
Miguel


Then when you're ready to write the regex, I highly suggest using
regexlib.com, plenty to choose from depending on how particular you want
to be:

http://regexlib.com/Search.aspx?k=email

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET
Nov 19 '05 #3
Hello,

I know the ASP.NET build in validation control to place in HTML code.

What I need is to check if variable myEmail has a valid email address.
I need to do this in my vb.net code in my aspx.vb code file.

Can someone send me an example of how to create this?

Thanks,
Miguel

"Craig Deelsnyder" <cdeelsny@no_spam_4_meyahoo.com> wrote in message
news:cdeelsny@no_spam_4_meyahoo.com:
On Mon, 09 May 2005 20:07:46 -0500, Scott Allen
<sc***@nospam.odetocode.com> wrote:

Hi Miguel:

You can use a RegEx Validation control. Here is a walkthorugh to get
started with:
http://support.microsoft.com/default...b;en-us;316662

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Mon, 9 May 2005 23:29:02 +0000, "Shapper"
<mdmoura*NOSPAM*@gmail.*DELETE2SEND*com> wrote:

Hello,

I have an aspx.vb code with a function.
In this function I need to check if a variable is a valid email address.

Something like: ad*****@domain.extension

How can I do this?

Thanks,
Miguel


Then when you're ready to write the regex, I highly suggest using
regexlib.com, plenty to choose from depending on how particular you want
to be:

http://regexlib.com/Search.aspx?k=email

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET


Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

20
by: | last post by:
If I need to check if a certain value does exist in a field, and return either "yes" or "not" which query would be the most effestive?
2
by: Mike | last post by:
I´ve got a number of SPAN elements named "mySpan1", "mySpan2", "mySpan3" etc, and want to set their "style.display" to "inline". This works (only needs to work on IE5.5+): for (var x = 1; x <...
8
by: Groups User | last post by:
C allows type casting in which a variable is converted from one type to another. Does C (whatever standard) allow the type of a variable to change, within a statement, avoiding the conversion?...
4
by: Laphan | last post by:
Hi all In my functions I'm using a double-check all the time to trap if a value has nothing in it and my question is do I need this double-check. My check line is: IF IsNull(xxx) OR...
11
by: Richard Meister | last post by:
Hi, I'd like to define several constants and make sure that all of them are smaller than a given other constant. I thought this could be done by a simple macro. Something like this: #define...
21
by: sanjaymeher | last post by:
Hi, Right now addDynamicMemory(char **ptr, int size) method can able to handle if input ptr is intitialized to NULL or something. But how to improve this method to handle uninitialized pointed...
10
by: Mark A. Sam | last post by:
Hello, I am using Visual Web Developer and decared a Public Variable in the Class section. I assigned a value in the load section, and on a button I set it up to increment, but it always...
25
by: Sourav | last post by:
Suppose I have a code like this, #include <stdio.h> int *p; void foo(int); int main(void){ foo(3); printf("%p %d\n",p,*p);
1
by: kang jia | last post by:
hi currently i am editing signup page, when user enter deupicated NRIC and click signup, they will go to do_signuppage and read the error message and then after 5 seconds, they will be redirected...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.