English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I am using ASP.net, and i have a text box with the name txtemail so as to enter valid or nearly valid email,for example if i try to insert,posh,it must not insert, but if i make it posh@yahoo.com,or posh@hotmail.com or in the form of other known address form it must accept it,
so how can i do that, remember i am using asp.net.

2006-10-23 03:45:46 · 1 answers · asked by Nebrom 1 in Computers & Internet Programming & Design

1 answers

You have two ways to validate it.
1) You can use regular expression in Javascript to validate the format of the email address.

2) You can use regular expression in ASP .NET to validate the format of the email address.

The difference between the two is, Javascript is run on the client side and it can be turned off by the users. However, ASP .NET is run on the server side, which you have the ultimate control on what needs to be checked.

By the way, in case you may not be familiar with the term, regular expression, regular expressions are used for pattern matching.

2006-10-23 03:51:47 · answer #1 · answered by knitting guy 6 · 3 0

fedest.com, questions and answers