Forum guidelines
AuthorQuestion
Difference between autopostback and ispostback
Posted on: 19 Sep 2011
Hi,

What is difference between AutoPostBack and IsPostBack. What is its use?

Thanks, in advance

AuthorReply
Re: Difference between autopostback and ispostback
Posted on: 19 Sep 2011  
AutoPostBack is the mechanism, by which the page will be posted back to the server automatically based on some events in the web controls. In some of the web controls, the property is called AutoPostBack, which if set to true, will send the request to the server when an event happens in the control.


For example.
ASP.NET DropDownList Control has the property AutoPostBack, if we set the property to true, whenever user selects a different value in the drop down list, the page posts back to the server.


IsPostBack property of the Page class. It is used to determine whether the page is posted back from the client. If IsPostBack property is false, then the page is loading for the first time, and if true, then the request is because of some event generated by web controls.

Re: Difference between autopostback and ispostback
Posted on: 19 Sep 2011  

Hi Alok..

Refer these links ….

Autopostback  Definition & Example : http://www.w3schools.com/aspnet/prop_webcontrol_textbox_autopostback.asp

http://www.w3schools.com/aspnet/showasp.asp?filename=demo_prop_webcontrol_textbox_autopostback

Ispostback Definition & Example :  http://www.w3schools.com/aspnet/aspnet_events.asp

http://www.w3schools.com/aspnet/showasp.asp?filename=demo_pageispostback

Thanks!

----------------------------------------------------------------------
If this reply helps your post…then check "This is correct answer"



Re: Difference between autopostback and ispostback
Posted on: 19 Sep 2011  
Hi Alok,

            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).

Thank You

Thank You, Prabhu Raja, www.prabhuraja.com

SPONSORED BY

Offshore Software and Database 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.