18

Possible Duplicate:
How do I get my C# program to sleep for 50 msec?

Is there any Delay() or sleep() in ASP.net to stop the application for some time?

peterh
  • 11,875
  • 18
  • 85
  • 108
user949914
  • 221
  • 1
  • 4
  • 9

1 Answers1

37
System.Threading.Thread.Sleep(numberOfMilisecondsToSleep)

See the documentation for further details. Generally, this isn't something you would have to do in an ASP.NET application very frequently. It will just make the request seem slower.

vcsjones
  • 138,677
  • 31
  • 291
  • 286