string filePath = "c:\download\test.doc";
Response.Clear();
// Specify the Type of the downloadable file.
Response.ContentType = "application/octet-stream";
// Set the Default file name in the FileDownload dialog box.
Response.AddHeader("Content-Disposition", "attachment; filename=" + filename);
Response.Flush();
// Download the file.
Response.WriteFile(filepath);
No comments:
Post a Comment