G
Guest
Hi.
I've got this code in my download page Page_load() method, but all I got in
the end is an empty file on client side... any clue ?
string filename="testfile.pdf";
Response.Clear();
Response.ContentType = "application/octet-stream";
Response.AddHeader("Content-Disposition", "attachment; filename=\"" +
filename + "\"");
Response.Flush();
Response.WriteFile("c:\\temp\\testfile.pdf");
I've got this code in my download page Page_load() method, but all I got in
the end is an empty file on client side... any clue ?
string filename="testfile.pdf";
Response.Clear();
Response.ContentType = "application/octet-stream";
Response.AddHeader("Content-Disposition", "attachment; filename=\"" +
filename + "\"");
Response.Flush();
Response.WriteFile("c:\\temp\\testfile.pdf");