How to make a Gmail-like loading indicator with ASP.NET Ajax
Step 1 - Add an UpdateProgress control to the page
First thing you have to add an UpdateProgress to your ASP.NET page.<asp:UpdateProgress ID="UpdateProgress1" runat="server" DynamicLayout="false"> <ProgressTemplate> <img src="Images/ajax-loader.gif" /> Loading ... </ProgressTemplate> </asp:UpdateProgress>
Step 2 - Add CSS
#UpdateProgress1 { background-color:#CF4342; color:#fff; top:0px; right:0px; position:fixed; } #UpdateProgress1 img { vertical-align:middle; margin:2px; }
This CSS will put the indicator on the top right corner of the window, as the Gmail indicator.
Step 3 - Add an activity indicator image
But we can do it even better then gmail, we could add a nice animated activity indicator. Last year http://mentalized.net/activity-indicators/to download some indicators.This is the animated gif I created to fit nicely into my UpdateProgress control:
And this is how the final Gmail-like loading indicator looks like:
Loading ...
No comments:
Post a Comment