Function DownloadFile(ByVal strFileName As String)Dim fs As FileStreamDim strContentType As String
Dim strPath = ConfigurationSettings.AppSettings(“DocumentsContainerLocal”)‘Dim strFileName As String = Request.QueryString(“DocumentFile”)
fs = File.Open(strPath & strFileName, FileMode.Open)
Dim bytBytes(fs.Length) As Byte
‘ Write the stream to the byte array
fs.Read(bytBytes, 0, fs.Length)
‘ Close the file stream to release the resource
fs.Close()
Response.AddHeader(“Content-disposition”, _
“attachment; filename=” & strFileName)
‘ Next we need to add some header [...]