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.
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...
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
///