Well, based on the issue:
1. One of the good ways would be to put unique constraint on the table itself! It will check before inserting.
2. If you want to do it in UI, then get all data and check in a loop. But that would be a lengthy procedure.
Option1 is good for you.
UPDATE:
Look here:
MSDN - UNIQUE Constraints[
^