HOW TO download files programmatically using ASP.NET

There are 5 choices:
  1. Direct Access
  2. Response.WriteFile
  3. Response.BinaryWrite and Response.OutputStream.Write
  4. ISAPI Filters
  5. Response.TransmitFile (new in ASP.NET 2.0)

"..use TransmitFile .. if you plan on serving a file more than once. TransmitFile is very efficient because it basically offloads the file streaming to IIS including potentially causing the file to get cached in the Kernal cache (based on IIS's caching rules)."

Comments