string filePath=file Name with Server path;
System.IO.FileInfo obj = new System.IO.FileInfo(filePath);
Response.ClearHeaders();
Response.Clear();
//Response.ContentType = "application/pdf";
Response.AddHeader("Content-Disposition", "attachment;filename=" + obj.Name);
//Response.TransmitFile(obj.FullName);
Response.WriteFile(obj.FullName);
Response.Flush();
Response.End();
Tuesday, May 26, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment