Send a file to a user through Response

/ Published in: ASP
Save to your folder(s)

Copy this code and paste it in your HTML
  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


RSS Icon Subscribe to comments

You need to login to post a comment.