Asynchronous Wait State Pattern in ASP.NET
For example, when a user enters data into a Web Form and clicks the submit button, the page does not change and the UI is unresponsive until the server sends a new page to the browser. If the UI is unresponsive for more than a few seconds, users are inclined to press the submit button repeatedly. These multiple submissions can cause problems for the application, forcing the developer to write code to handle the repeats.
A cleaner approach would be to keep the user informed about the server process with updated messages and a progress bar in the browser. In this column, you will learn how to create an asynchronous ASP.NET wait page that does exactly that. Let's begin by creating a page that initiates a long-running process. (The samples in this article are written in C# unless otherwise noted.)