[SOLVED] downloadFile with "save as"


I need to write a process to download an html file locally in my vb.net web app. I am currently using webClient.DownloadFile :

Dim myWebClient As New System.Net.WebClient
myWebClient.DownloadFile("http://archive.ncsa.illinois.edu/primer.html", _

Is there a built-in way to do this with a “save as” window instead, so that the user can select the location they would like the file to be saved to? Or would I need to write my own?


You can use

Response.AddHeader("Content-Disposition", "attachment;filename=testfile_file.html");
Response.Write or Response.WriteFile

Answered By – ElectricMan Sparky

Answer Checked By – Senaida (BugsFixing Volunteer)

Leave a Reply

Your email address will not be published. Required fields are marked *