Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / April 2007

Tip: Looking for answers? Try searching our database.

Email Validation inside webservice.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Srini - 25 Apr 2007 13:21 GMT
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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.