停止/中止asp.net脚本服务调用 [英] Stop/Abort asp.net script service call
问题描述
大家好,
有没有一种方法可以终止asp.net脚本调用(Web服务调用).就像在普通的ajax调用中那样:
Hi guys,
Is there a way that you can abort a asp.net script call (webservice call). Like you would do in a normal ajax call:
var xhr = $.ajax({});
//kill the request
xhr.abort();
脚本服务调用类似于:
A script service call would resemble:
NameSpace.ClassName.FunctionName(param1, param2, successCallBack, failCallBack);
如果已经执行了该调用但尚未返回结果,有没有办法可以中止此调用?
感谢您的帮助:)
问候,
Morgan
Is there a way you can abort this call if it has already been executed and has not yet returned results?
Will appreciate your help :)
Regards,
Morgan
推荐答案
.ajax({}); // 杀死请求 xhr.abort();
.ajax({}); //kill the request xhr.abort();
脚本服务调用类似于:
A script service call would resemble:
NameSpace.ClassName.FunctionName(param1, param2, successCallBack, failCallBack);
如果已经执行了该调用但尚未返回结果,有没有办法可以中止此调用?
感谢您的帮助:)
问候,
摩根
Is there a way you can abort this call if it has already been executed and has not yet returned results?
Will appreciate your help :)
Regards,
Morgan
这篇关于停止/中止asp.net脚本服务调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!