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

前端之家收集整理的这篇文章主要介绍了asp.net – 什么是部分回发?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我是一个经验丰富的网页开发人员在几个不同的网络技术堆栈.我现在在.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值更新.

原文链接:https://www.f2er.com/aspnet/249797.html

猜你在找的asp.Net相关文章