<script type=”text/javascript”>
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(requestEndHandler );

// This function will handle the end request event
function requestEndHandler(sender, args) {
   if( args.get_error() ){
      document.getElementById(“errorMessageLabel”).innerText = 
         args.get_error().description;
      args.set_errorHandled(true);
   }
}
</script>

<div id=”errorMessageLabel”></div>