Difference between AutoPostBack=True and AutoPostBack=False?

bindu picture bindu · Aug 29, 2012 · Viewed 123.4k times · Source

What's the difference between AutoPostBack=True and AutoPostBack=False?

Answer

Vishal Suthar picture Vishal Suthar · Aug 29, 2012

Taken from http://www.dotnetspider.com/resources/189-AutoPostBack-What-How-works.aspx:

Autopostback is the mechanism by which the page will be posted back to the server automatically based on some events in the web controls. In some of the web controls, the property called auto post back, if set to true, will send the request to the server when an event happens in the control.

Whenever we set the autopostback attribute to true on any of the controls, the .NET framework will automatically insert a few lines of code into the HTML generated to implement this functionality.

  1. A JavaScript method with name __doPostBack (eventtarget, eventargument)
  2. Two hidden variables with name __EVENTTARGET and __EVENTARGUMENT
  3. OnChange JavaScript event to the control