0

I'm using ASP.NET ListView. Users will enter email address like shown below:

abc@example.com;abcdedf@example.com;abcedefe@example.com

I need to validate that the email address is in correct format. is there any quick way of validating this. Please note, I don't have code behind, if possible I like to do this in JQuery or Javascript. it's ListView with 233 records where user can edit any record at any time.

abatishchev
  • 98,240
  • 88
  • 296
  • 433
Nil Pun
  • 17,035
  • 39
  • 172
  • 294

1 Answers1

0

Use a regular expression:

http://msdn.microsoft.com/en-us/library/ms972966.aspx

Here is a example for email adresses: http://www.regexlib.com/REDetails.aspx?regexp_id=16

Helge Becker
  • 3,219
  • 1
  • 20
  • 33
  • 1
    @abatishchev: The example is a very simple email verifier, not a ready made solution, but it is enough to get the questioner started. – Greg May 26 '11 at 13:24
  • As per my Question, it's out of box ListView with Editing function enabled. How do I know which field to check? ListView seems to automatically provide id for each text fields as MainContent_ListView1_NameText_0..MainContent_ListView1_NameText_2.... – Nil Pun May 26 '11 at 21:30