开发者

What is the difference between postback, autopostback and callback?

开发者 https://www.devze.com 2023-01-13 02:36 出处:网络
can you define autopostback and postback and it\'s differencesand which web server control support autopostback and postback and also the difference betwe开发者_Go百科en postback and callback?

can you define autopostback and postback and it's differences and which web server control support autopostback and postback and also the difference betwe开发者_Go百科en postback and callback?


  • postback: the page performs a POST request to itself
  • autopostback: a postback is performed automatically, for example when the selected value of a dropdown changes
  • callback: a method which is invoked when a certain event occurs such as clicking on a button. It also could have another meaning that a page performs a request back to the server (such as an AJAX request).


A postback is initiated by the browser, and reloads the whole page, usually when a control on the page (e.g. a button) is changed.

With some controls (e.g. Checkboxes), you choose if changing the control should result in a postback. This property is called AutoPostback.

A callback is initiated by java script in the page, and can load/update parts of the page, e.g. by manipulating the DOM.


Controls that support AutoPostback includes:

  • List item
  • ListControl
  • BulletedList
  • CheckBoxList
  • DropDownList
  • ListBox
  • RadioButtonList
  • CheckBox
  • TextBox


  • PostBack happens when data is send to the server (he page performs a POST request to itself)
  • IsPostBack helps you to identify if postback happen or not
  • Autopostback if this property of control is true helps to you post as soon as data change on the contol or some event occur
  • callback is a special postback, so a round-trip always occurs; however, unlike the classic postback, the script callback doesn't redraw the whole page. ViewState is not updated during a callback, it is for postback.
0

精彩评论

暂无评论...
验证码 换一张
取 消