string Filename= MapPath("document.pdf"); // This is an important header part that informs the client to download this file. Response.AppendHeader("content-disposition", "attachment; filename=" + Path.GetFileName(Filename)) Response.ContentType = "Application/pdf" //Write the file directly to the HTTP content output stream. Response.WriteFile(Filename);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)