Click here to Skip to main content
15,883,841 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How to check email id in textbox exist or not in asp.net c#
Posted

1 solution

To check for email valid:

C#
string email = txtemail.Text;
Regex regex = new Regex(@"^([\w\.\-]+)@([\w\-]+)((\.(\w){2,3})+)$");
Match match = regex.Match(email);
if (match.Success)
    Response.Write(email + " is corrct");
else
    Response.Write(email + " is incorrct");


To check if the email actually exists, you would have to send an email and check if it bounces back.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900