string FullFilePath =//path of file //"D:\\ASP\\ASP.doc"; FileInfo file = new FileInfo(FullFilePath); if (file.Exists) { Response.ContentType = "application/vnd.ms-word"; Response.AddHeader("Content-Disposition", "inline; filename=\"" + file.Name + "\""); Response.AddHeader("Content-Length", file.Length.ToString()); Response.TransmitFile(file.FullName); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)