Code
private void DownLoad(string filename)
{
FileInfo DownloadFile = new FileInfo(filename);
Response.Clear();
Response.ClearHeaders();
Response.Buffer = false;
Response.AddHeader("Content-Type", "application/PDF");
Response.AppendHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(DownloadFile.FullName, System.Text.Encoding.UTF8));
Response.AppendHeader("Content-Length", DownloadFile.Length.ToString());
Response.WriteFile(DownloadFile.FullName);
Response.Flush();
Response.End();
}
private void DownLoad(string filename)
{
FileInfo DownloadFile = new FileInfo(filename);
Response.Clear();
Response.ClearHeaders();
Response.Buffer = false;
Response.AddHeader("Content-Type", "application/PDF");
Response.AppendHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(DownloadFile.FullName, System.Text.Encoding.UTF8));
Response.AppendHeader("Content-Length", DownloadFile.Length.ToString());
Response.WriteFile(DownloadFile.FullName);
Response.Flush();
Response.End();
}