Today i got a chalange to break trought, that was handling a Timeout on a Async Request, and i find out that the solution was in adding to the HTML source a Page Request Manager that validates if the request fall into a Timeout.
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(function (sender, args) {
if (args.get_error() && args.get_response().get_timedOut()) {
// Tratar o timeout
// colocar o errorHandled = true para evitar receber a popup gerada pela biblioteca de AJAX.
args.set_errorHandled(true);
}
});
And belive me, it works ...
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.