开发者

What's the Microsoft Ajax equivalent to jquery.ajaxSetup() or .ajaxError()?

开发者 https://www.devze.com 2022-12-29 07:45 出处:网络
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 automatic

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

0

精彩评论

暂无评论...
验证码 换一张
取 消