Posted on: 10/17/2015 7:38:42 PM | Views : 1624

Thank u.

Downloading file using the code below.Where I am wrong?Getting error
... is a physical path, but a virtual path was expected. Download("E:\TRER\index.html") Public Sub Download(ByVal path As String) Dim fileInfo As New FileInfo(Server.MapPath(path)) If fileInfo.Exists Then Dim fullname As String = fileInfo.FullName Response.Clear() Response.ContentType = "application/octet-stream" Response.AppendHeader("Content-Disposition", String.Format("attachment; filename={0}", fileInfo.Name)) Response.WriteFile(fullname) Response.End() End If End Sub

Go to the complete details ...