Real-time refresh of Web page data

Source: Internet
Author: User
Tags net return client
Data | refresh | Web page

Real-time refresh of Web page data

Originally intended to implement such a feature on a Web page: for example, there are multiple buttons on the page, button 1, button 2, button 3, etc.

The response of the button 1 is time-consuming, how can you click on the button 1, do not wait for its response, you can click its

His button, and the button 1 will brush the result after the response is finished?

Think carefully, it is impossible! This requirement is very simple for WinForm programs and is difficult for the web.

Do not wait for the response of Button 1 to return, can only be asynchronous implementation, open thread or BeginInvoke.

But the page refresh is finished, how to refresh the page after the asynchronous event is done?

Common page operations are pull technology, and from the server to the page is pushing technology, how to achieve?

In other words, ASP. NET can not be asynchronous, all the operations can only be synchronized, we entered the data, pass

Click or other operation, the data brush to the server, we wait for the return of the server ...


Implemented with Ajax?

Ajax is a client-side approach that interacts with Java EE,. NET, PHP, Ruby, and CGI scripts without necessarily caring what the server is.

This technology covers the technology that allows browsers to communicate with the server without refreshing the current page.

The following is a method of Ajax interaction that differs from standard request/response methods used in standard Web customers:

1. A client triggers an AJAX event.

2. Create an instance of the XMLHttpRequest object.

3. Respond to the server side.

4. The server can do what you want to do.

5. Request returned to the browser.

6. XMLHttpRequest processing return value, call the corresponding function to display.
Http://blog.csdn.net/w_fenghui/archive/2007/01/25/1493365.aspx



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.