Strategy for "your file is uploading" message

  • Thread starter Thread starter Jared
  • Start date Start date
J

Jared

I'd like to display a "please wait while your file is uploading" page
immediately after someone uploads a large-ish file. I know I could
make something really slick with DHTML, or even something semi-slick
using a hidden frame to post the form to. However, both of these
approaches carry browser-compatibility risks.

It's my understanding that my server-side code doesn't execute until
the file is completely received by IIS, so I can't send any HTML back
to the client until after the upload is complete -- which is obviously
too late.

Does anyone have any cross-browser-safe methods for providing a "please
wait" message while a file is uploading?

TIA
Jared
 
There are loads of them! Just let your fingers and mouse do the searching on
"ASP.NET Progress".
Peter
 
There is no method without using Javascript. As you said, you can't send
anything back from the server until the upload is complete.
 
Jared,

If you upload the file using an asynchronous handler, you can use only
server-side code to display a status bar by checking the status of the
upload. You only have to set a meta header http-equiv to refresh the
page in an interval.

Google for "asynchronous file upload" or post a question for code.

Regards,
Tasos.
 
I neglected to mention that this is being hosted by a third party, so
the file upload must be handled natively by ASP.NET. I guess I'll just
post the upload to a hidden frame and use javascript to show a "please
wait" message. That seems to be the solution least likely to create
browser-compatibility issues.

Thanks for the suggestions.
Jared
 
Back
Top