From: Siegfried Heintze on
Can someone kindly explain to me the difference between AJAX and a postback?

I coded AJAX calls in javascript to web services extensively back in
2003-2004 before the term AJAX as coined.

I've used postback with ASP.NET with Visual Studio.

They seem very similar. How does ASP.NET implement a postback so that it
does not have to update the screen?

Why would you want to use AJAX instead of postback?

Thanks,
Siegfried


From: Mark Rae [MVP] on
"Siegfried Heintze" <siegfried(a)heintze.com> wrote in message
news:eIIt4iS2KHA.5588(a)TK2MSFTNGP06.phx.gbl...

> Can someone kindly explain to me the difference between AJAX and a
> postback?

AJAX allows a portion of the page to be updated without needing to update
the entire page


> How does ASP.NET implement a postback so that it does not have to update
> the screen?

It doesn't - that's what AJAX is for.


> Why would you want to use AJAX instead of postback?

When you want to update a portion of the page without updating the entire
page.


--
Mark Rae
ASP.NET MVP
http://www.markrae.net

From: Andy O'Neill on

"Siegfried Heintze" <siegfried(a)heintze.com> wrote in message
news:eIIt4iS2KHA.5588(a)TK2MSFTNGP06.phx.gbl...
> Can someone kindly explain to me the difference between AJAX and a
> postback?
>
> I coded AJAX calls in javascript to web services extensively back in
> 2003-2004 before the term AJAX as coined.
>
> I've used postback with ASP.NET with Visual Studio.
>
> They seem very similar. How does ASP.NET implement a postback so that it
> does not have to update the screen?
>
> Why would you want to use AJAX instead of postback?

It allows for a more responsive user experience, in theory anyhow.
A fair number of asp.net webforms will have autopostback set on several
controls because you have to select this before it can decide what to show
in that or whatever. They send the entire page back to the server, the code
on the server does it's stuff and the whole page is sent back.
Maybe all to see if a check box was checked.
So what the user sees is he clicks some check box, the whole page jumps and
flickers.... and on he goes.
This disturbs some people because they don't understand what's going on and
just want the thing to work like a windows app.

Ajax allows you to send a smaller portion of the page back and forth.
So it can reduce IO.
There again if ajax is over-used you can find IO going up, but that's a
different story.

You know when you use a search engine and type in your criteria?
And it comes up with a bunch of suggestions as you type.
Ever thought about how a web page does that?

From: Gregory A. Beamer on


"Siegfried Heintze" <siegfried(a)heintze.com> wrote in message
news:eIIt4iS2KHA.5588(a)TK2MSFTNGP06.phx.gbl...
> Can someone kindly explain to me the difference between AJAX and a
> postback?
>
> I coded AJAX calls in javascript to web services extensively back in
> 2003-2004 before the term AJAX as coined.
>
> I've used postback with ASP.NET with Visual Studio.
>
> They seem very similar.

On a technical level, they are exactly the same. From the client side, they
are seen a bit differently, of course.

> How does ASP.NET implement a postback so that it does not have to update
> the screen?

By using JavaScript to get the data and then using JavaScript to paint a
portion of the screen.

> Why would you want to use AJAX instead of postback?

To give the user the appearance things are going faster.

--
Peace and Grace,
Greg

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

************************************************
| Think outside the box! |
************************************************

From: Patrice on
> Can someone kindly explain to me the difference between AJAX and a
> postback?

A postback is the submit mechanism built since the beginning into browsers
and allows by design to send a request (including all forms fields) to a web
server that respond with a new page that is then displayed and entirely
replace the current page.

To complement this, the idea is to be able to send a request to a web server
but without any relation to the display. This way you can send what you want
to a web server and process the response as you wish (possibly to update a
part of the page but could be used also just to send updates and get a
confirmation that the update happened on the server or whatever else you
could wish).

--
Patrice