Response.Redirect("~/Download/instructions.docx");
Dim downloadFile As New System.IO.FileInfo(outputFileName) If downloadFile.Exists Then context.Response.Clear() context.Response.ContentType = "application/pdf" context.Response.AddHeader("Content-Disposition", String.Format("attachment; filename={0}", downloadFile.Name)) context.Response.AddHeader("Content-Length", downloadFile.Length.ToString()) context.Response.TransmitFile(downloadFile.FullName) context.Response.Flush() Else Throw New Exception("File not found") End If
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)