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
Srini - 25 Apr 2007 14:25 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.