Click here to Skip to main content
15,886,823 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
If i want to delete relation oriented records in webgrid in MVC 3 it should display foreign key relation maintained exception
so i would like to Display that massage in Alert box to User with out sql exception
how it is possible please send the Answer.
Posted
Comments
bbirajdar 26-Mar-13 5:03am    
How are you checking that the -"record is relation oriented"? Can you show your code?

1 solution

If you have maintain relationships in database level then database engine will not allow to delete
such records. you only have to capture such errors when deleting such records.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900