views:

199

answers:

5

Is there a way to make ASP page update in real time, like Ajax?

+1  A: 

ASP.NET ajax:

asp.net/ajax
wikipedia.org/wiki/asp.net_ajax

Or for classic ASP:

aspajax

byte
A: 

Sure, with JavaScript and DOM, create a 1x1 IFRAME and make it load an asp page that will Response.Write whatever information in whatever simplest format you can parse with JavaScript. I did it back in 1999 way before AJAX was invented.

zvolkov
oh oh I'm scared.
zvolkov
A: 

yeah with ajax, you could simply use jQuery or even the Asp.Net Ajax Client Library, also there are other frameworks that will help you do this in a very simple way, or you could go the hard way and hand roll your own javascript to make the requests.

On jquery there are a number of methods such as $.post that allow you to make an asynchronous request to the server, just point it to the correct url and you will have the data you wish.

jgarcia
+8  A: 

Hi LikeToCode. I'll give you a brief summary of ASP & AJAX to help you understand the difference between these two technologies.

ASP

ASP is a server-side language. Like it's cousins: Python, Ruby, PHP. It is used to generate dynamic content on the server, and then pass it along as HTML to the client's browser. ASP cannot "update" anything in realtime, as it cannot connect to a client of it's own accord to make an update. Each update/response from your ASP server must be in response to a request from the client.


AJAX

AJAX stands for Asynchronous Javascript And XML. It is not a language in and of itself. The language here is Javascript, which is primarily a client-side language. AJAX functions by the javascript running on the client machine sending a "special" request (XMLHTTPRequest) to your server, and receiving a response. Javascript then uses this response to update the page dynamically.


That said, you should study up on both Javascript and ASP before you begin attempting to create something. AJAX is somewhat of an advanced topic. As mentioned previously http://asp.net/ajax is a good resource.

hobodave
Thank you! I'll do as you say.
LikeToCode
A: 

Check ajaxed which is a free AJAX library for classic ASP. Many tutorials included.

Michal