Download File Code In ASP.Net

User avatar
Site Admin
Posts: 35
Joined: Sun Jul 03, 2016 2:17 pm
Location: India

Download File Code In ASP.Net

Postby admin » Sun Jul 03, 2016 5:05 pm

Download File Code In ASP.Net

Code: Select all

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)

Response.AddHeader("Content-disposition", "attachment; filename=" & fl)
Response.ContentType = "application/octet-stream"
Finest web hosting solution at the most affordable rates
Cheap Website Hosting
cheap VPS hosting india

Return to “Scripts / Code Snippets”

Who is online

Users browsing this forum: No registered users and 0 guests