I have an ASP.NET MVC site that uses both Microsoft Ajax [Ajax.BeginForm()
] and jQuery to make asynchronous requests. I want to configure both frameworks such that a generic error handler is automatically attached if the developer does not explicitly specify a failure callback.
In jQuery I can accomplish this with either .ajaxSetup() or .ajaxError(). What is the equivalent in the Microsoft Ajax client library? I'm fairly sure it开发者_StackOverflow中文版's something in the Sys
object but I can't find it...
You can check the client events of the PageRequestManager object. The equivalent of ajaxError seems to be endRequest whereas the equivalent of ajaxSetup should be initializeRequest
精彩评论