Hi,
I am developing a project in which i have to use exception handling.......I want that wheneever as exception occurs that time i will show a custom error message to the user......some people are suggesting to use web.config file ..Below is the code i have to write in web config file..
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
But problem is that for each error i have to create a separate error file........AND i don't know at runtime which type of error will be generated...
If is there any better way to sohw the custom errror message to user.......Kindly help me.......Plz write ur opinion briefly