Although I was not able to try and see if its working but by my previous experience I can suggest the following. Try changing your code as follows:
public void ProcessRequest(HttpContext context)
{
string attachment = String.Format("attachment; filename=Hierarchie des produits au {0}.csv",
DateTime.Today.ToShortDateString());
context.Response.AddHeader("content-disposition", attachment);
context.Response.ContentType = "text/csv";
context.Response.AddHeader("Pragma", "public");
context.Response.ContentEncoding = Encoding.GetEncoding(1252);
context.Response.Write(DemandeTarifImageBLL.DataTableToCSVString());
context.Response.Flush();
context.Response.End();
}
Adding Flush and End clears the buffer and marks the response end respectively. This way the client would reach a definite conclusion that the Request has been completely processed.
Also you can control the update progress with the client side script, here is a sample code:
var prm = Sys.WebForms.PageRequestManager.getInstance();
prm.add_endRequest(EndRequest);
function EndRequest(sender, args) {
if (postBackElement.id == 'Panel1Trigger') {
$get('UpdateProgress1').style.display = 'none';
}
}
The above js code adds an handler for update panels end request event and on the function closes the Update progress.
Try putting the contents of you ProcessRequest function of your handeler to the button click event, and do remember to add Flush() and End function for the response.
EDIT 1:
On looking further in stack overflow I found the following link with the issue similar to yours, and this confirmed my assumption that you can not have a redirect inside an update panel:
asp:UpdateProgress never goes away after clicking on downloadable content inside a repeater
Hope this helps.