I've looked at many resources and the following should work, however my save as dialog box is never showing (not browser specific):
Response.ContentType = "application/octet-stream";
string downloadName = "Request "+request.RequestID+ "_researchExport.doc";
Response.AddHeader("Content-Length", 
    new System.IO.FileInfo(FileName).Length.ToString());
Response.AddHeader("Content-Disposition", 
    string.Format("attachment; filename={0};", downloadName));
Response.WriteFile(FileName);
Response.Flush();
Response.End();
The file definitely exists. I've also tried the following:
- Using - Response.TransmitFile(FileName)instead
- Leaving out - Response.End()
- Leaving out the - Content-Lengthheader
- Using - this.ControllerContext.HttpContext.Response
Any help would be greatly appreciated
 
     
    