Vlidation controls firing twice asp.Net

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a client side jscript validation routine that I am calling on submit.
This routine makes and AJAX call back to a method on the server which checks
for duplicate records in a DB. (this works fine.)
If there are not any duplicates then the form submits the new record to the
DB via postback and code behind code. (this works fine)

Then for some reason the javascript validation function is called again
which then fails because the new record is already in the DB. The page still
contines on as if all validation passed but a validation message pops up
saying that there are duplicates. Confusing to say the least.

Anyone have any ideas how to prevent or solve this?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top