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

Popular posts from this blog

Kai-Fu Lee on China-US AI Race - Q&A Transcript from a Bloomberg Interview

The Mercurial Grok AI Assistant Understands & Speaks Indian Languages

40 Talks from the Google Web AI Summit 2025