Handling UpdatePanel Errors Gracefully
You enable a custom error page by adding the following element to
the system.web section of your web configuration file:
File: Default.aspx
<%@ Page Language="C#" %>
UpdatePanel Error
You can disable custom error pages in the case of an asynchronous postback by adding an AllowCustomErrorRedirect attribute to the ScriptManager tag, like this:
Web.Config