I am using VS2010 and Sql Server 2000. There are two tables referenced by foreign key and I am not allowing Master record to be deleted, if record is present in child table. The scenario is working fine, but the problem is that when user will try to delete the record, I want to show custom error message to the user instead of sql exception. How can I do tha?