You must Sign In to post a response.

Difference between AUTOPOSTBACK and ISPOSTBACK in asp.net

Hi I am BASKARAN I want to know the Difference between AUTOPOSTBACK and ISPOSTBACK in asp.net, why we give AUTOPOSTBACK=true in clint side? and why we give ISPOSTBACK=false in server side ? pls give me brife explaination, and define inline code..? in asp.net.


Comments

#609139    Author: PalaniKumar.A    17 May 2011 Member Level: Gold   Points : 2

hi Baskaran,


Difference between AUTOPOSTBACK and ISPOSTBACK in asp.net
topic was discussed in our DNS forums..

Refer the below Link :



http://www.dotnetspider.com/forum/286585-Difference-between-AUTOPOSTBACK-ISPOSTBACK-asp-net.aspx


Palanikumar.A
$-Success is often the result of taking a misstep in the right direction-$

#609142    Author: banu  17 May 2011 Member Level: Gold   Points : 3

Autopostback - page is posted back to the server automactically based on some events in the control.

ispostback- checks whether the page is being loaded in response to a client postback, or if it is being loaded and accessed for the first time.

ispostback=true -page is being loaded in response to a client postback.
ispostback=false -the page is loaded for the first time

#609143    Author: madhavi  17 May 2011 Member Level: Bronze   Points : 3

HI

•postback:
the page performs a POST request to itself

•autopostback:
a postback is performed automatically, for example when the selected value of a dropdown changes


•callback:
a method which is invoked when a certain event occurs such as clicking on a button. It also could have another meaning that a page performs a request back to the server (such as an AJAX request

#609164    Author: sundar    17 May 2011 Member Level: Silver   Points : 4

Autopostback - Property of the controlIsPostback - Property of the Page classAutopostback - 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.Hope it will help.


autopostback: a postback is performed automatically, for example when the selected value of a dropdown changes.
Controls that support AutoPostback includes:

List item
ListControl
BulletedList
CheckBoxList
DropDownList
ListBox
RadioButtonList
CheckBox
TextBox

#609298    Author: sugandha    17 May 2011 Member Level: Gold   Points : 3

AutopostBack posts the page to the server automatically whenever some changes is done in that controls data. Like Textbox text is changed it is automatically posted to server.
Dropdownlist selected value changed.

IsPostBack is used to check page is loaded for the first time or is reloaded. eg:
if page is loaded for first time we enter the value in dropdownlist from database. If the page is reloaded we are not going to enter that value again. So we check for
IsPostBack condition


Regards,
Sugandha
Microsoft Certified Technology Specialist
MY Blog..


This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.