简体   繁体   English

回调和部分回发有什么区别?

[英]What's the difference between a Callback and a Partial Postback?

Is there a difference, or are the terms synonymous? 有区别吗,还是术语同义?

Sorry if this has been asked before, I could only find the difference between a full postback and a callback. 抱歉,如果以前已经问过这个问题,我只能找到完整回发和回调之间的区别。 I'm already aware of how a full postback is different. 我已经知道完整的回发有何不同。

In using ASP.Net 2.0, if that matters. 如果使用ASP.Net 2.0,那很重要。 (By the way, does it matter? Or are these terms defined the same for any web based application?) (顺便说一句,这有关系吗?或者对于任何基于Web的应用程序,这些术语的定义是否相同?)

Thanks in advance. 提前致谢。

Good question... 好问题...

From http://p3net.mvps.org/CHowSharp/2007/August/08192007.aspx 来自http://p3net.mvps.org/CHowSharp/2007/August/08192007.aspx

The only real difference is the terminology but when people are using these terms they generally have two different concepts in mind. 唯一真正的区别是术语,但是当人们使用这些术语时,他们通常会想到两个不同的概念。 A callback occurs when the client calls back to the server to perform some work and then updates the UI on the client. 当客户端回叫服务器以执行某些工作,然后在客户端上更新UI时,将发生回调。 It is different than a normal postback because only the necessary UI elements are updated. 它与普通的回发不同,因为仅更新必要的UI元素。

A partial postback is the AJAX terminology for a callback. 部分回发是回调的AJAX术语。 In reality a partial postback uses a callback to call back into the server. 实际上,部分回发使用回调来回调服务器。 Callbacks are supported in ASP.NET v2 but not partial postbacks. ASP.NET v2支持回调,但不支持部分回发。 AJAX adds support for partial postbacks. AJAX添加了对部分回发的支持。 With partial postbacks AJAX effectively takes over the rendering of the page. 通过部分回发,AJAX有效地取代了页面的呈现。 When a partial postback occurs AJAX steps in lets ASP.NET start the normal postback process. 当发生部分回发时,AJAX可以使ASP.NET启动正常的回发过程。 However AJAX controls the rendering so it only renders the controls that it needs. 但是,AJAX控制呈现,因此它仅呈现所需的控件。 When rendering is complete AJAX packages up the rendered data and returns it to the client. 渲染完成后,AJAX将打包的数据打包并将其返回给客户端。 On the client-side AJAX updates the DOM for the page with the changes. 在客户端,AJAX使用更改来更新页面的DOM。

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

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