I am using the code below to stream a file. When the modal dialog appears, if the user selects "Open", the content opens correctly as a PDF, however, if the user clicks "Save", the file is saved without a file extention. This is a problem because when our users save a file and try to open it on their computer, they are prompted to select a program to open it with. This situation occurs in both FF and IE. Is there a way I can modify the code below to append the ".pdf" file extension? Thanks!
HttpContext.Current.Response.Buffer = true;
HttpContext.Current.Response.Charset = "";
HttpContext.Current.Response.Cache.SetCacheability(HttpCacheability.NoCache);
HttpContext.Current.Response.ContentType = "application/pdf";
HttpContext.Current.Response.AddHeader("content-disposition", "attachment;filename=" + dt.Rows[0]["Title"] + ".pdf");
HttpContext.Current.Response.Binary ...
Go to the complete details ...