多个异步回发在同一时间 - ASP.NET [英] Multiple Async postbacks at the same time - ASP.NET

查看:145
本文介绍了多个异步回发在同一时间 - ASP.NET的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

说我有2 的UpdatePanel 页面,每个的UpdatePanel 有一个服务器按钮每个。当我点击第一个按钮,然后第二个按钮,并期待在Firebug,我看到第二个异步回发时不触发直到第一个完成。

Say I have 2 UpdatePanels on the page and each UpdatePanel has a one server Button each. When I click on the first button and then the second button and look in Firebug, I see that the 2nd async postback is not triggered until the first one completes.

这是按预期工作?我的理解是用AJAX回发,对于按钮的事件处理程序同时触发。

Is this working as expected? My understanding was with AJAX postbacks, the event handlers for the buttons trigger simultaneously.

编辑:?任何帮助任何人

推荐答案

有准确的模型。你可能想pagemethods。

It is accurate for that model. You probably want pagemethods.

编辑: drachenstern说:终于回到我的电脑

drachenstern says "finally back at my computer"

下面的东西:一个UpdatePanel基本上是一个页面回发。它只能在一个时间发布一个事件。该模型不明白两个同时发生的事件。所以,每一次点击就是一个完整的回发。因此,它不会启动一个,直到其他饰面。

Here's the thing: An UpdatePanel is fundamentally a page-postback. It can only post one event at a time. The model doesn't understand two simultaneous events. So each click is one full postback. Therefore it doesn't start the one till the other finishes.

所以,就像我说的,这是对模型准确的行为。有没有真正太多可以做的改变,除了模型来定义自己的模型。你不能只是希望模型做你想要的东西,而不能定义要发生什么。

So like I said, it's accurate behavior for the model. There's not really much you can do to alter the model except to define your own model. You can't just want the model to do something that you want without being able to define what you want to happen.

这篇关于多个异步回发在同一时间 - ASP.NET的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆