Download files in ASP .Net
This is a useful function for downloading files. I use it a lot when downloading files from protected directories.
Public Shared Function DownloadFile( _
ByVal Server As HttpServerUtility, _
ByVal Response As HttpResponse, _
ByVal strFileName As String) As Boolean
Const adTypeBinary = 1
Dim strSql As String
Dim strFilePath, strFileSize, strDownloadFileName, strFileType As String
Dim objFileInfo As FileInfo
- Download this code: Download.txt
Trackback URI |