开发者

ASP.Net Ajax - UpdateProgress Sleep

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 i开发者_如何转开发t 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?


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);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜