[Mono-list] Mono, ASP.NET et Javascript push
Alain Perry
Alain Perry <alain.perry@gmail.com>
Thu, 3 Feb 2005 21:34:00 +0100
Hi list,
This is partly OT, but I thought maybe some of you might at least know
where to find information on the Internet about this.
I am trying to code a little web-based jabber client with Mono. A
jabber library already exists that compiles and runs great with Mono,
so that will greatly simplify it all. Thanks guys !
However, I am looking for some information about the way things work
with ASP.NET.
Actually, the application will use a javascript PUSH method to send
trigger functions in the HTML webpage when a jabber event is received
on the server. This means I need to keep the connection alive. I tried
to do so using
Response.AppendHeader ("Connection", "keep-alive");
Response.AppendHeader ("Keep-Alive", "timeout=16, max=100");
in the Page_Load method of my page. However, when everything in this
method is done, the connection is still cut, and nothing is processed
anymore. If I add a Thread.Sleep(1000) at the end of Page_Load, then
the function that sends the "<script/>" events is triggered, and the
webpage receives it, so the function does work. I am wondering if any
of you guys has an idea about how to keep a connection alive with
ASP.NET in order to do javascript push.
Another question: if a Webforms control is already displayed on a web
page, and, while the connection is still alive, the data in this
control is modified, will ASP.NET send a javascript event to modify
its content ? In other words, can ASP.NET Webforms do the javascript
work for me ?
Thanks for your help, and sorry if I have been unclear. Tell me where
and I'll try to explain it better :-)
--
Alain Perry