Save Dialog Box inside the WriteAllBytes, Possible?
Web Development
1
Posts
1
Posters
0
Views
1
Watching
-
Hi Guys, I have just copied the source code below from other sites. This codes will download a textfile from ftp server with network credentials. There's no problem in this code, just want to have a some kind of "Save Dialog Box". Because right now it is hard coded "C:\Sample.txt". How would I prompt the Save Dialog box, so that the target directory is dynamic? Codes below: Try Const ftpURI = "ftp://309..." Dim filename As String = ftpURI & "Sample.txt" Dim client As New WebClient client.Credentials = New NetworkCredential("anonymous", "password") My.Computer.FileSystem.WriteAllBytes("C:\Sample.txt", _ client.DownloadData(filename), True) MsgBox("File downloaded!") Catch ex As Exception MsgBox(ex.ToString) End Try
hifiger2004