Here is a code that actually download a file for your website visitor:
Dim fst As New FileStream(Server.MapPath("abc.txt"), FileMode.Open)
Dim fi As String
fi = "abc.txt"
Dim bytBytes(fst.Length) As Byte
fst.Read(bytBytes, 0, fst.Length)
fst.Close()
Response.AddHeader("Content-disposition", "attachment; filename=" & fl)
Response.ContentType = "application/octet-stream"
Response.BinaryWrite(bytBytes)
Read More: ASP - Simple Login Script
ASP.Net - Send Email Using System.Web.Mail Class
Sign up or log in