0

On submit, I have to check if the information that is being posted to the database matches anything that already exists in a table. If it does detect a duplicate, it will then interrupt the post and prompt the user that a duplicate already exists and allow them to change the data so they can resubmit. I am currently using asp and javascript to post the information to the DB, but have read for this ajax will be the way to go to check for duplicate values. By the way, I can't use PHP :(. Does anyone have some great resources or insight on how to do this? Thanks for your time and help!

5
  • Did you mean that all the treatement it's been doing in client side? Commented Aug 27, 2012 at 23:06
  • Yes, so all the information that the user has put into the respected fields and then check that data against what already exists in the DB. Commented Aug 27, 2012 at 23:14
  • What's your starting point? Do you know how to use AJAX or JQUERY to make the requests from the client? Do you know how to do the asp side of things? What version of .NET are you running? Commented Aug 27, 2012 at 23:54
  • I understand David F. but I have to say that this is not the best way to do this (no for the control but for the connection why? simply becouse it's not secured, the client can see and eventually modifie all the values in your DB, so you need to use some php code. Ok just for warn you. I supost I can find something I'll lokking for it. Commented Aug 28, 2012 at 0:16
  • Hey Guys, sorry had some stuff come up, but my knowledge on Ajax is novice, but JQuery I use a lot so I would like to think I am crafty with it. We are using classic asp and I am using it to create a record set to check if a duplicate exists, but it only works AFTER the information has already been passed, so it doesn't help too much. Also Russo, it doesn't matter if they can see the data in there since everyone already has access to it. But thank you for bringing that up! It is a bummer we cant use PHP. Hurray for guidelines? Commented Aug 28, 2012 at 18:12

1 Answer 1

1

Use Ajax Pagemothods calls from javascript and check for duplicate entry in db. This will not postback the page. Try the below link for pagemethods sample

http://aspalliance.com/1922_PageMethods_In_ASPNET_AJAX

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.