3 Answers, 1 is accepted
0
Hello Barry,
As RadAjax Prometheus is based on the ASP.NET AJAX framework we would suggest you to review the following ASP.NET AJAX article on error handling here that describes the desired functionality (section "Using Client Script to Customize Error Handling").
Best wishes,
Manuel
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
As RadAjax Prometheus is based on the ASP.NET AJAX framework we would suggest you to review the following ASP.NET AJAX article on error handling here that describes the desired functionality (section "Using Client Script to Customize Error Handling").
Best wishes,
Manuel
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0

LeBear
Top achievements
Rank 1
answered on 27 Mar 2008, 12:47 AM
If anyone is working on this, I thought I would update...
The end request handler is certainly the way to go. As is usually the case, however, it's hard to find what information is available in such a handler. I found the argument documented very well here: http://asp.net/AJAX/Documentation/Live/ClientReference/Sys.WebForms/EndRequestEventArgsClass/default.aspx
I created an error handler that specifically checks for a timeout, though you could check for more if you like:
FYI, the showTrace calls are debugging output for my application that, if a flag is set, will display the message in a special window on the page. As such, you can ignore those calls. Oh, and I also have a variable on the page, activeGadgetID_gin that just keeps track of which gadget is currently executing.
And... when there's a timeout, I have another mechanism elsewhere that handles it - imperfectly. I'm going to change it so that this routine triggers my timeout handler.
I hope this helps someone.
Enjoy!
The end request handler is certainly the way to go. As is usually the case, however, it's hard to find what information is available in such a handler. I found the argument documented very well here: http://asp.net/AJAX/Documentation/Live/ClientReference/Sys.WebForms/EndRequestEventArgsClass/default.aspx
I created an error handler that specifically checks for a timeout, though you could check for more if you like:
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler); |
function EndRequestHandler(sender, args){ |
showTrace('Checking Response for request from gadget ' + activeGadgetID_gin); |
if (args.get_response().get_timedOut()){ |
showTrace('Request Timed Out!'); |
args.set_errorHandled(true); |
} else { |
if (args.get_error() != undefined){ |
if (document.getElementById('TraceFlag').value == "1"){ |
showTrace('Error: ' + args.get_error().message + '(' + args.get_response().get_statusCode() + ')'); |
} else { |
alert('Error: ' + args.get_error().message + '(' + args.get_response().get_statusCode() + ')') |
} |
} |
} |
} |
FYI, the showTrace calls are debugging output for my application that, if a flag is set, will display the message in a special window on the page. As such, you can ignore those calls. Oh, and I also have a variable on the page, activeGadgetID_gin that just keeps track of which gadget is currently executing.
And... when there's a timeout, I have another mechanism elsewhere that handles it - imperfectly. I'm going to change it so that this routine triggers my timeout handler.
I hope this helps someone.
Enjoy!
0
Hello Barry,
Thank you for posting your solution in our public forum - this can be useful for other community members which would like to use similar approach. I updated your Telerik points for the involvement.
Best regards,
Stephen
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Thank you for posting your solution in our public forum - this can be useful for other community members which would like to use similar approach. I updated your Telerik points for the involvement.
Best regards,
Stephen
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center