1. Download an object through byte [] Data
FileDownLoadByByte([] fileData, = = , +
LoadFileFromServer( fileName, = , +, = = System.Text.Encoding.GetEncoding(
②
= , filename = Server.MapPath(
3. Download an object in the form of a stream
fileName = ; filePath = Server.MapPath( FileStream fs = [] bytes = [(= Response.AddHeader(, +
4. Excel download
Http://www.cnblogs.com/TiestoRay/archive/2013/02/02/2576134.html
5. If you use. NET MVC3 (and above), everything becomes simpler.
For example
filePath = Server.MapPath( File(filePath, ,
It has six Available Forms
FileContentResult File([] fileContents, fileName, FileContentResult File([] fileContents, contentType, FileStreamResult File(Stream fileStream, contentType, FilePathResult File( fileName, contentType, fileDownloadName);
6. Read the ftp file to the string
= = ftp += (FtpWebRequest)FtpWebRequest.Create(= = = reqFTP.Method?=?== line = (line != =),