Hi all!
I have a gridview with a templatefield and an imagebutton
<asp:TemplateField>
<ItemTemplate>
<asp:ImageButton ID="Riepilogo" runat="server"
CommandArgument="<%#((GridViewRow)Container).RowIndex%>"
ImageUrl="~/img/search.png"
CommandName="riepilogo" ToolTip="Riepilogo attività impianto"
onClick="prova" OnClientClick="src='img/blue_loader.gif'; Visible='True'"/>
</ItemTemplate>
</asp:TemplateField>
When i click that imagebutton, the onclientclick event changes the standard
image to a "waiting" animated gif.
The code for CommandName is something like that:
...
Response.ClearHeaders();
Response.Clear();
Response.AddHeader("Content-Disposition", "attachment;
filename=output.pdf");
Response.ContentType = myStuff.getAppSetting("ContentTypePDF");
Response.Flush();
Response.BinaryWrite(pdf);
Response.End();
...
This generates a PDF files that pops up for the download.
Now i have to change the image back to normal (not waiting). How do i
accomplish this?
Thank you in advance.
bruce barker (sqlwork.com) - 19 Nov 2007 16:28 GMT
becuase the request is a file download, there is no browser notification
javascript can get of when the domaload is done. you can use ajax to poll the
server to for when the download is done. be sure the poll is non-session
page.
-- bruce (sqlwork.com)
> Hi all!
> I have a gridview with a templatefield and an imagebutton
[quoted text clipped - 30 lines]
>
> Thank you in advance.