void Application_Error(object sender, EventArgs e) { // Code that runs when an unhandled error occurs }