A
AlexB
I'm trying to download a text file to an IE client using
the following code. The problem is that the saved file
also includes the html for the page.
Any ideas anyone?
Private Sub Button5_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles Button5.Click
Dim strFileToDownload$ = "C:\test.log"
Response.ContentType = "application/octet-stream"
Response.AddHeader("Content-
Disposition", "attachment; filename = " &
System.IO.Path.GetFileName(strFileToDownload))
Response.Flush()
Response.WriteFile(strFileToDownload)
End Sub
the following code. The problem is that the saved file
also includes the html for the page.
Any ideas anyone?
Private Sub Button5_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles Button5.Click
Dim strFileToDownload$ = "C:\test.log"
Response.ContentType = "application/octet-stream"
Response.AddHeader("Content-
Disposition", "attachment; filename = " &
System.IO.Path.GetFileName(strFileToDownload))
Response.Flush()
Response.WriteFile(strFileToDownload)
End Sub