Question

Getting to grips with ASP.Net Ajax

I've got a simple UpdatePanel with an associated UpdateProgress which I'm using to tell a user their shopping cart has been added to.

Is it OK to use System.Threading.Thread.Sleep(5000); in the code behind so the user can actually see the UpdateProgress? Or is this bad practice? If it is what's the best thing to do?

Was it helpful?

Solution

It is bad practice, if the user is on a slow connection you are going to make them wait an extra 5 seconds for an update.

If you wish to show someone the loading screen do a shorter wait like .5 of a second.

System.Threading.Thread.Sleep(500);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top