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