<asp:UpdateProgress runat="server" AssociatedUpdatePanelID="UpdatePanel1" >
<ProgressTemplate>
<asp:Image ImageUrl="/images/progress.gif"/>
</ProgressTemplate>
</asp:UpdateProgress>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
//gridview, textbox and button controls
</asp:UpdatePanel>
When testing this page on a local machine, the database tasks complete in a second. Maybe that's the reason the progress image doesnt show up. So I tried this..
btnSave_Click()
{
System.Threading.Thread.Sleep(3000);
//Code to save record to DB , bring back some data and bind to grid
}
Now, after clicking on btnSave, the image appears for 3 seconds and the DB task is done.
Here is the Question. When hosted on a server, the tasks might take 5-10 sec. So, in this case, will the image stay until the task is done or will it just stay for 3 secs, irrespective of the status of task.
I actually want to show the image until the tasks are done.