i would like ask about, how to download file from url by code vb.net?
example : Example Link
before download the file, user MUST input Username and Password? how can i do that? any reference or link? thanks!
To download a file, supplying a user name and password Use the DownLoadFile method to download the file, specifying the target file's location as a string or URI and specifying the location at which to store the file, the user name, and the password. This example downloads the file WineList.
Get an access token by clicking the extensions icon near the address bar. Browse to any GitHub repo and right-click the blank section near any file/folder and click "Download folder/file name as zip".
Use System.Net.WebClient.DownloadFile
Dim remoteUri As String = "http://belajar123.com/materi.zip"
Dim fileName As String = "materi.zip"
Dim password As String = "..."
Dim username As String = "..."
Using client as New WebClient()
client.Credentials = New NetworkCredential(username, password)
client.DownloadFile(remoteUri, fileName)
End Using
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With