By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
460,028 Members | 1,026 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 460,028 IT Pros & Developers. It's quick & easy.

Delay

P: n/a
Hi,

In Web Application I would like to create delay for 30 sec in the code to
enable external process to run. During the delay in application I would
like to show the user message like "Please wait while the data being
updated..."

Can u help me please with code lines?

Thank u very much for the help and the answer.

Nov 16 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
adish11 <ad*****@walla.co.il> wrote:
In Web Application I would like to create delay for 30 sec in the code to
enable external process to run. During the delay in application I would
like to show the user message like "Please wait while the data being
updated..."

Can u help me please with code lines?


Basically you need to send a page with a refresh in, something like:

<META HTTP-EQUIV="Refresh" CONTENT="30; URL=http://myurl.com/">

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #2

P: n/a
You could use javascript to show and hide a layer using the
window.setTimeout method as shown here :

http://javascript.internet.com/messa...t-message.html

or you could use the refesh metatag

<META HTTP-EQUIV="Refresh" CONTENT="30;URL=http://www.done.aspx">

So you could execute you long running process in a page with the above tag
at the top, display a message there, then after 30 seconds it would
redirect to the done page.
"adish11" <ad*****@walla.co.il> wrote in
news:a5******************************@localhost.ta lkaboutsoftware.com:
Hi,

In Web Application I would like to create delay for 30 sec in the code to
enable external process to run. During the delay in application I would
like to show the user message like "Please wait while the data being
updated..."

Can u help me please with code lines?

Thank u very much for the help and the answer.

Nov 16 '05 #3

P: n/a
Thanks for the answers,but..

I need to use delay in C# code in the same page between
the code lines.

I use System.Diagnostics to run external process and I want to show delay
message for user for 30 sec while the process r being executed.

I want to prevent from user going to other pages in application or doing
anything else, while the process still running.

Another thing I want the time for delay (30 sec) to be argument that taken
from web config in the project,so if the external process will be changed
the time delay can be changed also.

Thank u very much for the help

Nov 16 '05 #4

P: n/a
Thanks for the answers,but..

I need to use delay in C# code in the same page between
the code lines.

I use System.Diagnostics to run external process and I want to show delay
message for user for 30 sec while the process r being executed.

I want to prevent from user going to other pages in application or doing
anything else, while the process still running.

Another thing I want the time for delay (30 sec) to be argument that taken
from web config in the project,so if the external process will be changed
the time delay can be changed also.

Thank u very much for the help

Nov 16 '05 #5

P: n/a
adish11 <ad*****@walla.co.il> wrote:
Thanks for the answers,but..

I need to use delay in C# code in the same page between
the code lines.
You can't, really. HTTP is fundamentally request/response - you should
start the processing in a background thread, finish the response, and
then on the next request check whether the process has finished or not.
I use System.Diagnostics to run external process and I want to show delay
message for user for 30 sec while the process r being executed.

I want to prevent from user going to other pages in application or doing
anything else, while the process still running.
The user is running a web browser. You don't get to control whether
they go elsewhere.
Another thing I want the time for delay (30 sec) to be argument that taken
from web config in the project,so if the external process will be changed
the time delay can be changed also.


Well you can make the refresh tag be generated according to your
config.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #6

P: n/a
Thanks for the answers,but..

I need to use delay in C# code in the same page between
the code lines.

I use System.Diagnostics to run external process and I want to show delay
message for user for 30 sec while the process r being executed.

I want to prevent from user going to other pages in application or doing
anything else, while the process still running.

Another thing I want the time for delay (30 sec) to be argument that taken
from web config in the project,so if the external process will be changed
the time delay can be changed also.

Thank u very much for the help

Nov 16 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.