G
Guest
Hi to all
i use a code to download from test.aspx
when it's download it's download test.aspx not the file i spl
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
my code:
Dim filename As String = "http:\\localhost\Image\2005120200.jpg"
Response.ContentType = "application/octet-stream"
Response.AddHeader("Content-Disposition", "attachment; filename="""
& filename & """")
Dim root As String = "C:\"
Dim files() As String = Directory.GetFiles(root)
Dim filepath As String = Request.Params("file")
If Not filepath Is Nothing Then
If File.Exists(filepath) And filepath.StartsWith(root) Then
Response.Clear()
Response.Flush()
Response.WriteFile(filepath)
End If
End If
''''''''''''''''''''''''
any ideas??
i use a code to download from test.aspx
when it's download it's download test.aspx not the file i spl
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
my code:
Dim filename As String = "http:\\localhost\Image\2005120200.jpg"
Response.ContentType = "application/octet-stream"
Response.AddHeader("Content-Disposition", "attachment; filename="""
& filename & """")
Dim root As String = "C:\"
Dim files() As String = Directory.GetFiles(root)
Dim filepath As String = Request.Params("file")
If Not filepath Is Nothing Then
If File.Exists(filepath) And filepath.StartsWith(root) Then
Response.Clear()
Response.Flush()
Response.WriteFile(filepath)
End If
End If
''''''''''''''''''''''''
any ideas??