Forum guidelines
AuthorQuestion
Autopostback and Ispostback in ASP.NET
Posted on: 19 Dec 2011
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.....

Vineet Kumar Saini  WEB Developerhttps://vineetsaini.wordpress.com/
AuthorReply
Satyapriya Nayak
  • 0
  • 0
accepted
Re: Autopostback and Ispostback in ASP.NET
Posted on: 19 Dec 2011   Accepted Answer
Hi Vineet,



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

If this post helps you mark it as answer
Thanks

Re: Autopostback and Ispostback in ASP.NET
Posted on: 20 Dec 2011  
IsPostBack
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

Share your knowledge to grow

SPONSORED BY

Custom Software Development
MCN is your source for developing solutions involving websites, mobile apps, cloud-computing, databases, BI, back-end services and processes and client-server applications.