Click here to Skip to main content
13,047,131 members (58,512 online)
Rate this:
Please Sign up or sign in to vote.
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 25-Mar-13 22:57pm
aspnet_regiis -i 26-Mar-13 5:03am
How are you checking that the -"record is relation oriented"? Can you show your code?

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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.

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 26 Mar 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100