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 BooleanConst adTypeBinary = 1Dim strSql As StringDim strFilePath, strFileSize, strDownloadFileName, strFileType As StringDim objFileInfo As FileInfo- Download this code: Download.txt
Trackback URI |