Asynchronous and synchronous postback in ASP.NET
异步和同步回发之间有什么区别?
From Plz tell me difference synchronous postback and asynchronous Postback
Asynchronous postback behaves much as the synchronous postback, All the server page life-cycle events occur. But in rendering phase, in an asynchronous postback only the contents of the update panels are sent back to the browser where as in synchronous postback all the page content is refreshed/sent back to the browser.
See also Partial-Page Rendering Overview
An asynchronous postback behaves much like a synchronous postback. All the server page life-cycle events occur, and view state and form data are preserved. However, in the rendering phase, only the contents of the UpdatePanel control are sent to the browser. The rest of the page remains unchanged.
AsyncPostBackTrigger: Asynchronous Postback triggers update the page partially without refreshing the whole page (AJAX)
-Converts postbacks into async callbacks
-Typically used to trigger updates when controls outside an UpdatePanel post back If ChildrenAsTriggers="false", can be used to specify which controls inside UpdatePanel should call back rather than post-back
PostBackTrigger: Postback triggers update the complete page caused by complete post of the page to the server.
-Lets controls inside UpdatePanel post back
-Typically used to allow certain controls to post back when ChildrenAsTriggers="true"
Asynchronous postback are generally used to provide enhanced browser functionality with the help of javascript. for example , filling designations in an department based on a department selected in a dropdownlist without causing a full page refresh.
use can use ASP Update panels- http://www.asp.net/Ajax/Documentation/Live/overview/UpdatePanelOverview.aspx
XMLHTTP REQUEST to call asp.net pages http://www.w3schools.com/XML/xml_http.asp
ASP>NET AJAX and web services http://www.asp.net/Ajax/Documentation/Live/tutorials/ExposingWebServicesToAJAXTutorial.aspx
链接地址: http://www.djcxy.com/p/50816.html上一篇: 异步与非
下一篇: ASP.NET中的异步和同步回发