Custom exception handling in asp.net
-
hi all, I am developing a web application using asp.net(vb). I need to handle the custom exceptions. i have created a custom exception class which inherits the properties of Application Exception. i need to display a custom error to the end user using that class by catching the exception. For Example: i have a function which checks for the input value if that value is less than the expected value i have to catch it as an exception and displays a user friendly message through my custom exception class . how to do it??? give me some sample code if Possible......... thank u all...... Regards Krishsenthilraj
-
hi all, I am developing a web application using asp.net(vb). I need to handle the custom exceptions. i have created a custom exception class which inherits the properties of Application Exception. i need to display a custom error to the end user using that class by catching the exception. For Example: i have a function which checks for the input value if that value is less than the expected value i have to catch it as an exception and displays a user friendly message through my custom exception class . how to do it??? give me some sample code if Possible......... thank u all...... Regards Krishsenthilraj
Hi Krishsenthilraj, you can user Enterprise library provided by microsoft. and second option is to handle and exception and write a logger for it and then redirect to one common page which will display an user friendly error messsage to the user. In case of any futher help let me know
Rahul Goel Microsoft Cerfied Solution Developer .Net Contact me at : rahul.g2510@gmail.com