Anil Namde
Anil Namde

Reputation: 6618

How to implement the push AJAX model in ASP.NET?

Simple AJAX model is to request some information to the server and the server returns response. If i am correct then it is called as a pull model.

However while reading some of the web 2.0 concepts i have came across push model stuff say for example the real time application like displaying the shock exchange price update on the web page. Where server is pushing the information to the client frequently and client updating the information.

Now how can i implement this behavior using ASP.NET or there is other framework that i have to use for this purpose ? Or is this just a theoretical model ?

Upvotes: 1

Views: 2262

Answers (2)

clyc
clyc

Reputation: 2450

Please see the following link: Comet implementation for ASP.NET?

you can use a framework like http://pokein.codeplex.com/ to achieve what you are looking for. Otherwise, for your stock exchange price example, most of them just have javascript that initiates a request to refresht the data from the client side.

Upvotes: 2

Matías Fidemraizer
Matías Fidemraizer

Reputation: 64943

Common approach is the use a client-side timer created with JavaScript and request for new data. If there's no updated data, response has some flag so there's no need of updating anything in the UI.

Just play with setInterval JavaScript function and AJAX.

Upvotes: 0

Related Questions