Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Asynchronous and synchronous postback in ASP.NET

What are the differences between asynchronous and synchronous postback?

like image 441
jrajesh Avatar asked Feb 17 '10 07:02

jrajesh


People also ask

What is synchronous postback?

The synchronous postback uploads your html in the request back to the server so that the server can remember the data viewstate of the page so it allow you to get the information from the input fields entered by the user and it require that the page get refreshed.

What is difference between AsyncPostBackTrigger and PostBackTrigger?

The AsyncPostBackTrigger “wires” up these controls to trigger an asynchronous post back. Conversely, controls declared inside an update panel will trigger an asynchronous call by default. The PostBackTrigger short circuits this, and forces the control to do a synchronous post back.

Is ASP.NET asynchronous?

The . NET Framework 4 introduced an asynchronous programming concept referred to as a Task and ASP.NET 4.5 supports Task. Tasks are represented by the Task type and related types in the System.

What is the use of AsyncPostBackTrigger?

Use the AsyncPostBackTrigger control to enable controls to be triggers for an UpdatePanel control. Controls that are triggers for an update panel cause a refresh of the panel's content after an asynchronous postback.


2 Answers

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.

like image 68
Adriaan Stander Avatar answered Oct 10 '22 02:10

Adriaan Stander


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"

like image 34
SHEKHAR SHETE Avatar answered Oct 10 '22 04:10

SHEKHAR SHETE