Hi
What is the difference between Postback and callback in Asp.NET ?
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Satyapriya NayakPosted Jun 29, 2012, 11:58 PM
Callback : It is a way to send a request to the web page from the client script. Postback is an expensive call with processing overhead. In callback a client function sends a request and a special marked method is invoked on the
server. It does the processing & returns the value which is received by another client function to process the result. To have client side callbacks, the page has to implement ICallbackEventHandler & implement functions RaiseCallBackEvent & GetCallBackResult.
PostBack: Postback is the event which sends the form data to the server. The server processes the data & sends it back to the browser. The page goes through its full life cycle & is rendered on the browser. It can be triggered by using the
server controls.
A Postback occurs when the data (the whole page) on the page is posted from the client to the server..ie thedata is posted-back to the server, and thus the page is refreshed (redrawn)...think of it as 'sending the server the whole page (asp.net) full of data'.
On the other hand, a callback is also a special kind of postback, but it is just a quick round-trip to the server to get a small set of data (normally), and thus the page is not refreshed, unlike with the postback...think of it as 'calling the server, and receiving some data back'
With Asp.Net, the ViewState is not refreshed when a callback is invoked, unlike with a postback.
Please refer the below links
http://wiki.answers.com/Q/Difference_between_callback_and_postback_in_asp_net
http://www.dotnetfunda.com/interview/exam717-what-is-difference-between-callbacks-and-postback-in-aspnet.aspx
Thanks
VulpesPosted Jun 29, 2012, 1:50 PM
http://stackoverflow.com/questions/365100/difference-between-a-postback-and-a-callback