﻿//Create an Init, so Sys is referenced - AKA undefined SYS will occur without this script
Sys.Application.add_init(AppInit);
 
function AppInit(sender) 
{
    //Add My Error Handling
    Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequest);
}
        
function EndRequest(sender, args) 
{
    //Make Sure There is an Error
    if (args.get_error() != undefined)
    {
        //Disable JS Alert From the AJAX Framework
        //AKA no popup because the error is being handled
        args.set_errorHandled(true);
    }
}
