加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > asp.Net > 正文

asp.net – 什么是部分回发?

发布时间:2020-12-15 22:57:34 所属栏目:asp.Net 来源:网络整理
导读:我是一个经验丰富的网页开发人员在几个不同的网络技术堆栈.我现在在.Net工作,我对部分回发变得好奇. 我明白Partial Postback的功能是什么,以及如何以编程方式使用它,但是我不喜欢使用我不明白的技术,那么Partial Postback如何实现. 我了解HTTP请求和异步请求
我是一个经验丰富的网页开发人员在几个不同的网络技术堆栈.我现在在.Net工作,我对部分回发变得好奇.

我明白Partial Postback的功能是什么,以及如何以编程方式使用它,但是我不喜欢使用我不明白的技术,那么Partial Postback如何实现.

我了解HTTP请求和异步请求,有关部分回发错误的事情是,它似乎是两者.

也许我只是错过了一些东西,但是在我看来,部分请求同时执行,首先触发异步POST请求,但是浏览器似乎知道,活动指示符开始旋转,这通常只发生在HTTP请求页面渲染.

任何人都可以看出微软如何在HTTP请求级别实施部分回发?

解决方法

从 How to write your own partial postback in ASP.NET 2.0:

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.

When the button on the ASPX page has been clicked,a client side HTTP request is made using the XMLHttpRequest API. This request is handled by an HttpHandler on the web server. The HttpHandler receives the request,processes it,and sends back the response to the XMLHttp object on the ASPX page. The XMLHttp object in turn consumes the response and renders the appropriate UI changes without the browser having to do a full refresh of the page.

UpdatePanel不仅刷新它所包含的控件,还可以在处理完成后从服务器获取的ViewState值更新.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读