问题
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. (By the way, does it matter? Or are these terms defined the same for any web based application?)
Thanks in advance.
回答1:
Good question...
From 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. It is different than a normal postback because only the necessary UI elements are updated.
A partial postback is the AJAX terminology for a callback. 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. AJAX adds support for partial postbacks. With partial postbacks AJAX effectively takes over the rendering of the page. When a partial postback occurs AJAX steps in lets ASP.NET start the normal postback process. However AJAX controls the rendering so it only renders the controls that it needs. When rendering is complete AJAX packages up the rendered data and returns it to the client. On the client-side AJAX updates the DOM for the page with the changes.
来源:https://stackoverflow.com/questions/3016424/whats-the-difference-between-a-callback-and-a-partial-postback