What is the difference between .IsPostBack and Page.IsCallBack pages?

I recently came across some code that checks Page.IsCallBack , but I was not sure how it differs from Page.IsPostBack . Can anyone enlighten me?

Edit : are they mutually exclusive or can occur simultaneously in a given situation?

+41
callback postback page-lifecycle
Apr 17 '09 at 15:33
source share
5 answers

Page.IsCallBack

Gets a value indicating whether the page request is the result of a callback. This is a special reverse gear, so there is always a trip around the world; however, unlike the classic postback, the script callback does not redraw the entire page. ViewState is not updated during the callback, it is for postback.

Page.IsPostBack

Checks if the page is accessing the server for the first time or not. Unlike IsCallBack, ViewState is updated.

For more information, see Page Life Cycle , which shows a diagram illustrating the sequence of events.

Edit - To answer a new question

The page.IsPostback property will return true for both types of requests. The Page.IsCallback property will return true only when the request is a client callback

+43
Apr 17 '09 at 15:35
source share
— -

IsPostBack true when a page is submitted through a form method

IsCallBack true when the page was called from an AJAX call.

+29
Apr 17 '09 at 15:36
source share

A callback is special feedback, so a callback always occurs; however, unlike the classic postback, the script callback does not redraw the entire page. ViewState is not updated during the callback, it is for postback.

More details here :

+6
Apr 17 '09 at 15:36
source share

A postback is when a form is sent back to itself, either by clicking the submit button or through Javascript (for example, AutoPostback controls).

A callback is when AJAX Control calls a method on a page as part of an ajax request

+6
Apr 17 '09 at 15:37
source share

Page.IsPostBack Checks if the page is accessing the server for the first time or not. Unlike IsCallBack, ViewState is updated.

0
Feb 04 '15 at 15:20
source share



All Articles