Ayo Softech

Wednesday 10 July 2013

What is the difference between autopostback and ispostback in Asp.Net?

Autopostback - Property of the control.

IsPostback - Property of the Page class.

Autopostback - get and set property to control postback on changes made for control.
for e.g.
this.ListBox1.AutoPostBack = true;
whenever user will select item the page will get post back.

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.

No comments:

Post a Comment