Priya Avanigadda

Priya Avanigadda

  • NA
  • 44
  • 16.3k

Checking the availability of Email???

Feb 27 2015 2:34 AM
I need to check the duplicate of Email from data base.I know we can do by using text changed event or we can use jquery validations but I want in a simple format,for that ,In my database  table I mentioned Unique key for Email column,if we give like that means while registering it won't allow to store duplicate value,it's worlikng very fine but the problem when I click on Register button with duplicate value ,am getting error like 

Violation of UNIQUE KEY constraint 'IX_Tbl_Registration'. Cannot insert duplicate key in object 'dbo.Tbl_Registration'.
The statement has been terminated.

 but instead this error I want to display a error message,so can anyone help me for this???

Answers (3)