By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,009 Members | 1,487 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,009 IT Pros & Developers. It's quick & easy.

Email Validation inside webservice.

P: n/a
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 xy*@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
Apr 25 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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

"Srini" <sr***********@sybrant.comwrote in message
news:e2*************@TK2MSFTNGP06.phx.gbl...
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 xy*@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


Apr 25 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.