Posted By

jink on 04/30/09


Tagged

file download aspnet


Versions (?)

ASP.net: Send a file to a user through Response


 / Published in: ASP
 

  1. //For TEXT:
  2. Response.ContentType = "text/txt";
  3. Response.AppendHeader("Content-Disposition", "attachment; filename=" + "file.txt");
  4. Response.Write(file.ToString());
  5. Response.End();

Report this snippet  

You need to login to post a comment.