One can use below mentioned ASP.Net code upon the requirement to download file:
Dim fst As New FileStream(Server.MapPath("abc.txt"), FileMode.Open)
Dim fl As String
if = "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)
Announcement
Collapse
No announcement yet.
How To Download File Code In ASP.Net?
Collapse
Unconfigured Ad Widget
Collapse
X