我对PostBack和Partial PostBack非常困惑,你能解释一下吗? [英] I am very confusing with PostBack and Partial PostBack, Can you please explain both of these?

查看:86
本文介绍了我对PostBack和Partial PostBack非常困惑,你能解释一下吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的,



你能解释一下PostBack和PartialPostBack吗?

Dear,

Can you please explain PostBack and PartialPostBack?

推荐答案

Major部分回发和正常回发之间的差异是呈现页面。



当我们回复部分回复时,浏览器只刷新页面上的特定区域回复后,它刷新完整页面。



所有进入服务器并返回的过程都是一样的。


当您将所有数据从Web窗体发回服务器时,会发生回发。部分回发,只是将Web表单中有限的数据块返回给服务器。
A post back occurs when you post ALL of the data back from the Web Form to the server. A partial post back, just returns a limited chunk of the data from a Web Form back to the server.


查看如何在ASP.NET 2.0中编写自己的部分回发 [ ^ ]。



摘录 - > 部分回发构建的核心是XMLHttpRequest,一个DOM API。它可以在Web浏览器脚本语言(如JavaScript)中使用,直接向Web服务器发送HTTP请求,而无需重新加载整个页面并在脚本语言中再次处理来自服务器的响应。然后,这些数据以XML的形式用于操作客户端的页面元素。



在服务器端,我们实现一个HttpHandler来处理请求并以有效的XML格式传回数据。



通过这样做,我们阻止页面刷新和网页中静态数据和内容的往返



这表示当您使用某种机制刷新页面的一部分时会发生部分回发。 />
当你刷新整个页面时,一个完整的回发。
Have a look at How to write your own partial postback in ASP.NET 2.0[^].

Excerpt -> "At the heart of the partial post back construction is the XMLHttpRequest, a DOM API. It can be used inside a web browser scripting language, such as JavaScript, to send an HTTP request directly to a web server without having to reload the entire page and handling the response from the server again within the scripting language. This data, in the form of XML, can then be used to manipulate the page elements on the client side.

On the server side, we implement an HttpHandler to handle the request and pass back data in a valid XML form.

By doing so, we are preventing page refreshes and roundtrips of static data and content in the web pages"

This indicates that a partial postback occurs when you are refreshing a part of the page using some mechanism.
A full postback would be when you refresh the entire page.


这篇关于我对PostBack和Partial PostBack非常困惑,你能解释一下吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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