Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I stop/delay the code for a few seconds? [duplicate]

Tags:

asp.net

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?

like image 588
user949914 Avatar asked Sep 17 '11 16:09

user949914


1 Answers

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.

like image 63
vcsjones Avatar answered Sep 23 '22 21:09

vcsjones