Click to See Complete Forum and Search --> : Progress During Download Option


Scott.Macmaster
September 2nd, 2008, 02:44 PM
A number of apps I have made for our intranet that has a preview option and a download option. The preview generally shows a table based on selected criteria. The download generally generates a excel file and then I initiate a download by during something like this...


Response.Clear()
Response.ContentType = "text/plain"
Response.AddHeader("content-disposition", "attachment; filename=" + filePath)
Response.WriteFile(Server.MapPath(filePath))
Response.End()


Most of my pages are AJAX enabled so I have a progress indicator that spins while the preview in being generated. I can also do that for the download option but for obvious reasons I'll get an error when the server sends the post back. So for now I have the progress indicator disabled for the download option. Is there another way I can provide a download option that allows me to use the progress indicator?


Thanks