>

Display Animated Loading GIF Image in ASPNet AJAX AutoCompleteExtender

By rickvdbosch

May 10, 2005 – 2 minutes

One way to display an animated GIF while executing a web service is by using JavaScript. ASP.NET has nothing to do or to hate with GIF and the browser has everything to do with GIF. With this article I will show you how to show an animated GIF while the AutoCompleteExtender is waiting for the result from the web service.

First create an animated GIF and save it as "loading.gif". This loading.gif will be displayed while the AutoCompleteExtender is waiting for the result from the web service. Then create a new ASP.NET AJAX Enabled Web Site project in Visual Studio .NET 2005. Add a new web form named "AutoCompleteLoading.aspx".

Add the following markup to the AutoCompleteExtender:

“`html “`

And add a TextBox to the page:

“`html “`

When you run the page, you'll see the animated GIF while the AutoCompleteExtender is waiting for the result from the web service.

Leave a Reply