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

Deadly 提交于 2019-12-06 13:48:23

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!