Hi all,
Im getting user information in webservice and storing in DB. In the
email address field, i do want to validate the email address.
like xyz@abc.com is give properly r not. (@ .) these things i wanna
check inside the webservice.
Please help me.
Any help vud be appreciatable.
Thanks & Regards,
Srinivasan.K
Mathias Wührmann - 25 Apr 2007 14:20 GMT
Hi Srini,
Srini schrieb:
> Im getting user information in webservice and storing in DB. In the
> email address field, i do want to validate the email address.
> like xyz@abc.com is give properly r not. (@ .) these things i wanna
> check inside the webservice.
check <http://www.regular-expressions.info/email.html> for general
information how to correctly validate an email address regarding a
correct format.
Also, check this article about E-Mail address validation:
http://www.codeproject.com/useritems/E-Mail_address_validation.asp
Regards,
Mathias Wuehrmann

Signature
http://www.flexact.de (Software, Consulting, Services)
Srini - 25 Apr 2007 15:59 GMT
Thanks Mathias Wührmann.
I got the solution.

Signature
Thanks & Regards,
Srinivasan.K
Mobile : +91-9840100320
E-Mail : srinivasan.vk@sybrant.com
> Hi Srini,
>
[quoted text clipped - 14 lines]
>
> Mathias Wuehrmann
Srini - 25 Apr 2007 14:24 GMT
Hi all,
i found the solution for this.
we can use like this:
public bool IsValidEmail(string strIn)
{
// Return true if strIn is in valid e-mail format.
return Regex.IsMatch(strIn,
@"^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$");
}
and we need to add the name space : system.text.regularexpressions;
this function will return wheather the given email address is valid or not.
Thanks to all.
Thanks & Regards,
Srinivasan.K
> Hi all,
> Im getting user information in webservice and storing in DB. In the
[quoted text clipped - 9 lines]
> Thanks & Regards,
> Srinivasan.K