Click here to Skip to main content
15,907,326 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello

i have another problem that is i want to put try catch on gridview edit and delete
since i m using wizard+store procedure how can i do that?second if i m deleting a data which is foreign key in another table how can handle this?

regards
Posted

i want to put try catch on gridview edit and delete
..... how can i do that

You are asking how to put a Try-Catch? Just put it across the lines of code that deal with updating or deleting the data from DB. Catch the error, log it and display friendly message!

if i m deleting a data which is foreign key in another table how can handle this
You need to do 'cascading delete'. First delete the referenced key item and then the other one. If that restricts you and is a valid restriction, raise the error and act accordingly.
 
Share this answer
 
thnx for ur assistance i have put try catch but the problem now i m facing is that it cant display error message on web form so kindly tell me how can i display the error message

Regards
 
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