Handling Exception/Error Redirection
There are 4 ways to handle error redirection
1) User < @%Page ErrorPage =”errPage.aspx” %>
2)Use PageError event handler to trap the errors on page. This overrides ApplicationError as well as web.config customErrors settings.
3) Use Application_Error event in Global.asax to handle application level errors
4) Use < customerrors > tag in web.config to handle the application error in a declarative way.
Server.GetLastError gives the details of last error and Server.ClearError clears the error and prevents the errors from continuing to Application_Error event.
Read More Articles

Comments