How to check that the provided e-mailid is valid or not?
-
Hi, I am new to asp.net,I would like to know if a user enters his e-mailid in my form, How to check whether it is fake or not? Plz help.
-
Hi, I am new to asp.net,I would like to know if a user enters his e-mailid in my form, How to check whether it is fake or not? Plz help.
Hi, I think you should definitely use a regular expression. A quick google search for "valid email regular expression" leads to a good example here: http://www.codetoad.com/asp_email_reg_exp.asp[^] That source is in the older ASP (not .NET), but the function should still work. --EDIT -- actually you'll need to change around the function a bit but you get the idea.
-
Hi, I am new to asp.net,I would like to know if a user enters his e-mailid in my form, How to check whether it is fake or not? Plz help.
-
Hi, I am new to asp.net,I would like to know if a user enters his e-mailid in my form, How to check whether it is fake or not? Plz help.
//java script function isValidEmailID(emailid) { var regex = new RegExp("\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"); var matches = regex.exec(emailid); return (matches != null && emailid == matches[0]); } //aspx.cs email = txtEmail.Text.Trim(); if (!IsValidEmail(email)) { custVal.ErrorMessage = "Valid EmailID : Must be Entered"; custVal.IsValid = false; return; }
Padmanabhan
-
Hi, I am new to asp.net,I would like to know if a user enters his e-mailid in my form, How to check whether it is fake or not? Plz help.
You can't, actually. There is no way of doing this. You can tell if an email address is possible, but not if it's real.
Christian Graus Driven to the arms of OSX by Vista. "I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
-
Hi, I am new to asp.net,I would like to know if a user enters his e-mailid in my form, How to check whether it is fake or not? Plz help.
-
Hi, I am new to asp.net,I would like to know if a user enters his e-mailid in my form, How to check whether it is fake or not? Plz help.
Hi, You can check email format by using validation & if you want to check it is exist or not then you should use any webservice or free dll.
Farogh Haider Web developer