Please let me know what is wrong in the save as dialogue code and how to correct it.
Response.ContentType = "application/pdf";
Response.AddHeader("content-disposition", "attachment; filename=" + FName);
FileStream sourceFile = new FileStream(TargetFile, FileMode.Open);
long FileSize;
FileSize = sourceFile.Length;
byte[] getContent = new byte[(int)FileSize];
sourceFile.Read(getContent, 0, (int)sourceFile.Length);
sourceFile.Close();
Response.BinaryWrite(getContent);
Thank You.

New Topic/Question
Reply
MultiQuote






|