During AJAX calls, the client communicates with the server and at times there is a processing time involved. In this recipe, we will display a progress indicator on the page during the call while the client waits for the response to return from the server.
For this recipe, you can use any animated progress indicator image. To download a custom image visit http://www.ajaxload.info/.
Select the type of image as well as the required background/foreground colors. Generate and save the image file to the
images
folder in the project.Add a new web form
Recipe1.aspx
to the current project.Add a css class to display the progress indicator:
.Progress { background-image: url(images/ajax-loader.gif); background-position: center; background-repeat: no-repeat; cursor: wait; padding: 10px; width: 200px; height: 100px; }
Add a button control to the form to trigger the AJAX request. Thus, the ASPX...