Define Error Events?

 Posted by Tripati_tutu on 10/7/2010 | Category: ASP.NET Interview questions | Views: 1846 | Points: 40

ASP.NET supports events. When any unhandled exception occurs in an application, an event occurs, that events are called as Error Events.

ASP.NET is having two events to handle exceptions.
• Page_Error: This is page event and is raised when any unhandled exception occur in the page.
• Application_Error: This is application event and is raised for all unhandled exceptions in the ASP.NET application and is implemented in global.asax

The Error events have two methods to handle the exception:
• GetLastError: Returns the last exception that occurred on the server.
• ClearError: This method clear error and thus stop the error to trigger subsequent error event.

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response