Is it possible to use ASP.NET push new content to browser automatically

R

Reid LI

I just know I can do something in HTTP header like
<meta http-equiv="refresh" content="5">

but can ASP.NET push, for example, new database content to browser
automatically without using browser polling like the above.
 
G

Guest

I just know I can do something in HTTP header like
<meta http-equiv="refresh" content="5">

but can ASP.NET push, for example, new database content to browser
automatically without using browser polling like the above.

The server cannot communicate with the client directly and client has
to request the information.

Instead of refreshing a whole page you can consider JS/AJAX
 
?

=?ISO-8859-1?Q?G=F6ran_Andersson?=

Reid said:
I just know I can do something in HTTP header like
<meta http-equiv="refresh" content="5">

but can ASP.NET push, for example, new database content to browser
automatically without using browser polling like the above.

It's the HTTP protocol that sets the limitation. There is no way that
the server can push anything to the browser without the browser
requesting it first.

If you want to send data from the server to the browser, you need to put
a component in the browser that establishes a permanent connection
between the server and the browser.

This is of course a complicated solution just to update some data. You
can let the browser look for changes on the server without reloading the
page. A Javascript can use something like AJAX to contact the server,
and if there is any updated data, it can either fetch the data and put
it in the page, or just reload the page.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top