“Please wait..” Message for heavy loading task

I have one page that takes about a minute to load my data when my page gets loaded. Because we have a tons of data and complex sql query so obviously It will take times to run the query and fetch it from the database. So until the page gets the data and doesn’t render on the client’s browser, page would be blank and only the progress bar shows that It is doing some process. Besides that browser’s progress bar, Its good to show some kind of wait custom message to the user so user will get the clear idea that page is doing some process so that he can just sit back, relax, and wait patiently.

I searched over the internet to find the best solution for that. I found one option that seems to be the best. Thats the Asynchronous Wait State Pattern in ASP.NET @ microsoft site. Here is the link to read that pattern http://msdn.microsoft.com/msdnmag/issues/03/12/DesignPatterns/. In this approach, It redirects from your input page to a wait page, and then almost immediately redirect to another page that would actually do the processing. This approach took advantage of a browser ‘feature’ that didn’t allow the browser to render the next page until it was completely finished processing. In the meantime, the previous page stayed visible. This approach had main drawback: if your wait page contained any animated GIFs (which wait pages are famous for), they would stop animating as soon as the long running page was requested. Good news is that that animated GIFs working fine on safari browser and sometimes on firefox but that never works for me in IE. God damn microsoft product !! I thought I needs to be in testing team in microsoft.

So this approach doesn’t work for me. Finally I got the better solution using asynchronous call back. That works fine for me. Here is the link http://www.codeproject.com/aspnet/wait_page.asp?df=100&forumid=163526&exp=0&select=1204866.

It stretch my head out to find the solution. Thank god finally I got the solution.

Hope that help you !!!

Posted in Microsoft Technology Tagged with: