Hi...
I'm very confuse in Autopostback and Ispostback property in asp.net ? Please explain Autopostback and Ispostback property in asp.net with an example ?
Thanks.....
Autopostback and Ispostback in ASP.NET
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.


Satyapriya NayakRank #47 · 31.5K reputationPosted Dec 19, 2011, 5:50 PM EST
Autopostback - Property of the control
Autopostback - get and set property to control postback on changes made for control.
Ex:-
this.dropdownlist1.AutoPostBack = true;
whenever user will select item, the page will get post back.
IsPostback - Property of the Page class
IsPostback - get property of the Page class, to check if page is post back i.e. if it is true then page has already executed Init function of the page else it is first time the page has requested to be executed.
Thanks
Anuja PawarRank #1,404 · 1.2K reputationPosted Dec 19, 2011, 8:51 PM EST
postback: the page performs a POST request to itself
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.
ispostback=true -page is being loaded in response to a client postback.
ispostback=false -the page is loaded for the first time
AutoPostBack
autopostback: a postback is performed automatically, for example when the selected value of a dropdown changes
With some controls (e.g. Checkboxes), you choose if changing the control should result in a postback. This property is called AutoPostback