Hi guys,
I have 3 questions regarding error trapping.
1. I have a number of inserts and updates in my application encapsulated in a try/catch blocks. On each page of my web app i have a Page_Error methods. What is best practices for catching the error if it happens on the insert/update. Should I catch it in try catch or is it better to handle it in the Page_Error method?
2.I also have another app that has a number of classes and each different class type has a save method that i call to save the object eg
Person newPerson = new Person("Bryan","Lemmer");
newPerson.save();
All my inserts/updates in classes are also in try/catch blocks. How do catch these errors if they are in the class, from my ASP.net page? Should i rather place try/catch around the newPerson.save()?
3. What is the best way to catch and handle the error? Should you set the error page to your custom error page in the web.config or do you redirect the ...
Go to the complete details ...