简体   繁体   English

到同一目标的异步回发被取消

[英]Async postbacks to the same target are cancelled

I'm using manually initiated postbacks to do some magic in a demonstration I'm making. 我正在使用手动启动的回发在正在进行的演示中做一些魔术。

This is the function I'm using to initiate them: 这是我用来启动它们的功能:

function doPostBackAsync(eventName, eventArgs) {
    var prm = Sys.WebForms.PageRequestManager.getInstance();
    prm.beginAsyncPostBack(null, eventName, eventArgs, false);
}

The problem I am having is that if the request is not completed before the user triggers a new postback, the request is cancelled. 我遇到的问题是,如果在用户触发新的回发之前请求未完成,则请求将被取消。

The only solution I've thought of is to add a random value to the query string, but in order to do so I would have to abandon using this function and likely create an ajax request, thus requiring significant rework to achieve the functionality I've developed thus far. 我想到的唯一解决方案是在查询字符串中添加一个随机值,但要这样做,我将不得不放弃使用此功能,并可能创建ajax请求,因此需要大量的返工才能实现我的功能到目前为止已经发展了。

Any ideas? 有任何想法吗?

阅读完这个问题后 ,我的印象是这是我要利用的框架的局限性。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM