I have a, ASP.net page which does some processing that takes a few seconds to complete. During processing I dont want the user to click back, forward, refresh, etc. I also want to avoid pop up's and iframes, because Browser compatability is very important.
So I figure the best way to do this is when the program loads, before anything at all happens, I want the text "Now Processing, please wait" to be sent and displayed in the browser. After processing is completed I'd like the text "Processing Done! Click here to continue" sent to the browser.
The page code will be somthing like this:
// Display first message
Response.Write( "Please wait while we process your request." );
// Do the processing which might take 10 seconds
...........
A FEW HUNDRED LINES OF CODE HERE
...........
// Processing Complete, display the rest of the page
Response.Write( "Processing Completed! Click here to continue!" );
I have thought about the problem myself and I realise that the best solution is to set "Response.Buffer" to false, and in theory the page should output to the browser as the page processes, rather then do all processing and output one huge chunk of HTML at the end of processing.
Unfortunatley it isnt working, even if I use "Resonse.Flush()" the page will still output everything at the end of processing, and it isn't doing the user any good telling them to "Please Wait" after they have already waited.
Can anyone please tell me what im doing wrong? Or perhaps give me a hint on what to do?
This used to work in classic ASP, but obviously in ASP.net things are different.
Question
Jelly2003
In a nutshell this is what im trying to do:
I have a, ASP.net page which does some processing that takes a few seconds to complete. During processing I dont want the user to click back, forward, refresh, etc. I also want to avoid pop up's and iframes, because Browser compatability is very important.
So I figure the best way to do this is when the program loads, before anything at all happens, I want the text "Now Processing, please wait" to be sent and displayed in the browser. After processing is completed I'd like the text "Processing Done! Click here to continue" sent to the browser.
The page code will be somthing like this:
I have thought about the problem myself and I realise that the best solution is to set "Response.Buffer" to false, and in theory the page should output to the browser as the page processes, rather then do all processing and output one huge chunk of HTML at the end of processing.
Unfortunatley it isnt working, even if I use "Resonse.Flush()" the page will still output everything at the end of processing, and it isn't doing the user any good telling them to "Please Wait" after they have already waited.
Can anyone please tell me what im doing wrong? Or perhaps give me a hint on what to do?
This used to work in classic ASP, but obviously in ASP.net things are different.
Thanks.
Link to comment
Share on other sites
1 answer to this question
Recommended Posts