Showing posts with label basic. Show all posts
Showing posts with label basic. Show all posts

Wednesday, March 28, 2012

How do I update text in a panel using ajax and a timer?

This is a pretty basic question, I just need to update a textbox every few minutes without using a postback. The text is pulled from a sql query. Is there a example for how to do this somewhere? (simialar to how gmail updates, etc...)

Take a look at this: http://encosia.com/index.php/2007/07/25/display-data-updates-in-real-time-with-ajax/

If you're only updating a simple text label, you could skip the UpdatePanel in my example andupdate that text on the client side, using a web method.

A combination of those two examples should give you what you're after.


Thanks for providing links.

Saturday, March 24, 2012

How can i use Comet with Asp.Net?

Im writing basic chat application and i want to useComet technique.
Im trying something like that but when thread Sleep, all event waiting end of sleep. How can i use Comet technique with Asp.Net?

void Page_Load(object sender, EventArgs e) {while (Response.IsClientConnected) {if (newMessage) { Response.Write(newMessage); } System.Threading.Thread.Sleep(1000); } }

It's much more complex than that.

The only C# implementation I've seen is:

http://sourceforge.net/projects/emergetk/

But it's experimental, and looks like a discontinued project.

There is a commercial solution for that, called Lightstreamer (google for it). They are working on this for more than 5 years, and they have a solid server for comet development. But they charge good money for their product.


I am currently working on an affordable version of server push for asp.net.

When contacting the earlier mentioned 'lightstreamer', I received a qoute for US$70.000,-

I guess it was better to make it myself :)

The site is officially not up and running yet, but take a look at the samples onhttp://www.pushasp.net.

These samples also contain the code used.

If you want to play around with the conrols, they should be available for download somewhere this week.

regards,

Arnold


Lightstreamer Moderato has been released last month and is completelyfree of charge for any kind of use.

More info atwww.lightstreamer.com

The ASP.NET AJAX demo is available fromhttp://www.lightstreamer.com/atlasDemo.htm

Cheers




offcourse the answer is PokeIn comet ajax library for asp.net ..



offcourse the answer is PokeIn comet ajax library for asp.net ..



offcourse the answer is PokeIn comet ajax library for asp.net ..



offcourse the answer is PokeIn comet ajax library for asp.net ..