Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Progress monitor for ASP.Net?

0 views
Skip to first unread message

Geoff Pennington

unread,
May 17, 2004, 12:42:45 PM5/17/04
to
My manager has asked me to do something that I don't think is possible with
a web browser interface. He is sure it IS possible. If he is right, can you
tell me how to do it?

The user submits a form asking when an event can be scheduled. The web
server runs through the database to find an available day. It may have to
check several days. When a day is found, the web server returns the page to
the browser displaying the day that was found. The same sort of thing every
ASP.Net page does.

My manager would like the server to send the browser "status reports": "Now
Checking Monday"; "Now Checking Tuesday"; etc. I don't think it can be done,
because once the server responds to the browser, the server is finished. Any
ideas?

Much obliged.


Marina

unread,
May 17, 2004, 12:53:16 PM5/17/04
to
There might be ways to do it, in the way expedia displays a 'searching'
message while looking for flights, etc. There are examples of this on the
web, you can google for it, though the typical examples just have one
'working' message, and don't keep changing the message - but you can
probably adapt their method.

You can definitely do this with a lot of client side work, by having the
client make calls to a web page via XMLHTTP, then getting back the result
and updating the display. XMLHTTP is only available in IE 5.5 and higher,
so this would be a limitation.

"Geoff Pennington" <penni...@stic2.com.NO!SPAM!> wrote in message
news:Oon$83CPEH...@TK2MSFTNGP11.phx.gbl...

Cor Ligthert

unread,
May 17, 2004, 12:55:35 PM5/17/04
to
Hi Geoff,

I think you can reach your goal when you use this sample I once made.
(The only thing I do not know is if it is fast enough on Internet I made it
once as a sample, however did never optimized it, because it is a crazy
sample.)

When the image is to slow then you can maybe to it with a Iframe, as I said
I never tried.

I hope this will work for you, or maybe you get a better answer.

Cor

\\\Form 1 Needs a imagebox on the page
Private Sub Page_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
Me.Image1.Height = New Unit(32)
Me.Image1.Width = New Unit(200)
Image1.Visible = True
Dim scriptString As String = "<script language=JavaScript>" & _
"setclock(); function setclock(){document.images.Image1.src = " & _

"'http://localhost/WebClock/WebForm2.aspx';setTimeout('setclock()',1000)}</s
cript>"
Page.RegisterStartupScript("setclock", scriptString)
End Sub
///
\\\Form2 needs nothing
Private Sub Page_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
Response.Cache.SetExpires(DateTime.Now.AddTicks(500))
Dim myForeBrush As Brush = Brushes.Black
Dim myFont As New Font("Times New Roman", 8, FontStyle.Regular)
Dim textHeight As Single
Dim bm As New Bitmap(120, 20)
Dim g As Graphics = Graphics.FromImage(bm)
g.Clear(Color.White)
Dim textSize As SizeF = g.MeasureString("now.tostring", myFont)
g.DrawString(Now.ToString, myFont, myForeBrush, _
New RectangleF(0, 0, 120, 20))
Dim ms As New IO.MemoryStream
Dim arrImage() As Byte
bm.Save(ms, Imaging.ImageFormat.Bmp)
arrImage = ms.GetBuffer
Response.BinaryWrite(arrImage)
g.dispose
End Sub
///


0 new messages