| Author: sudha 01 Sep 2008 | Member Level: Silver | Rating: Points: 6 |
string path = Server.MapPath(strAppPath); System.IO.FileInfo file = new System.IO.FileInfo(path); if (file.Exists) { Response.Clear(); Response.AddHeader("Content-Disposition", "attachment; filename=" + file.Name); Response.AddHeader("Content-Length", file.Length.ToString()); Response.ContentType="application/pdf"; Response.WriteFile(file.FullName); Response.End(); }
use this code in button event handler....
|