message displaying

message displaying

am 01.06.2005 00:43:25 von Pervaiz Khawaja

Can you please help me in asp code. I am display a message
when webpage downloading "Please Wait while
Schedule Generates" and message should go away when page
finished downloading.
I appreciate your help. thanks

Re: message displaying

am 01.06.2005 01:22:26 von mgreenway

Unfortunately there is no way to have ASP remove the text that has
already been posted to a user's browser. But there is a small work
around

The simplest way to do this has 3 parts.

First : you will need to put this in the first couple of lines of the
page

Response.Buffer = False

Second:
Before your code begins to operate you should output the
Response.write("Please Wait while Schedule Generates")

Third:
you will need to send a Meta Refresh tag such as
Response.write(" URL=/GeneratedSchedule.asp"">")


This will send the client computer to the GeneratedSchedule page after
1 second.

you could also send it to the page you are already on with a
querystring that says that it has already been calculated.


Hope that works

MGReenway

Re: message displaying

am 01.06.2005 13:15:14 von reb01501

Pervaiz Khawaja wrote:
> Can you please help me in asp code. I am display a message
> when webpage downloading "Please Wait while
> Schedule Generates" and message should go away when page
> finished downloading.
> I appreciate your help. thanks

You can use Response.Buffer=True, Response.Flush, and some client-side code
to make this happen. Here is an example of using this technique to present a
progress bar to the user:

<%@ Language=VBScript %>
<%Response.Buffer=true%>







<%

Response.Flush

'Here is where the long-running script starts
dim i

for i = 1 to 1000000 'simulate long running script

'update "percent complete" periodically.
if i/10000 = CLng(i/10000) then
'Response.Write CStr(Clng(i/10000)) & "-"
Response.Write ""
Response.Flush
End if

next

%>







HTH,
Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"