protected void Button7_Click(object sender, EventArgs e) { string fPath = @"\\Server12\170912.dot"; FileInfo myDoc = new FileInfo(fPath); Response.Clear(); Response.ContentType = "Application/msword"; Response.AddHeader("content-disposition", "attachment;filename=" + myDoc.Name); Response.AddHeader("Content-Length", myDoc.Length.ToString()); Response.ContentType = "application/octet-stream"; Response.WriteFile(myDoc.FullName); Response.End(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)