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.....
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 Dec 19, 2011, 10:50 PM
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 PawarPosted Dec 20, 2011, 1:51 AM
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