Click here to Skip to main content
15,885,365 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hi guys..
Thanks in advance
I have created jobPortal application in asp.net.In that While Employer Register in Register.aspx then How to check valid Email or not in asp.net,c#...

Please Let me know...
Posted

 
Share this answer
 
Hi,

Have a look at this article:
Effective Email Address Validation[^]
 
Share this answer
 
Use this

C#
string email ="^([a-zA-Z0-9_\\-\\.]+)@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.)|(([a-zA-Z0-9\\-]+\\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\\]?)$";
           Regex r = new Regex (email);
           if (r.IsMatch(txtemailid.Text))
           {
               return true;
           }
           else
           {
               MessageBox.Show("Please Enter proper EmailId"","Employee Form", MessageBoxButtons.OK, MessageBoxIcon.Information);
               return false;

           }
 
Share this answer
 
v2
Comments
24983 11-Nov-12 1:25am    
Thanks a lot

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