If there is a cached copy of sUrlToDownload in my PC then my function do not retrive the desired file from the internet, but only copy from the cache. How can I avoid this problem?
Function bDownload(ByVal sUrlToDownload As String) As Boolean
Dim sOd As String
Dim myWebClient As New WebClient
sOd = "c:\filetostore.txt"
If File.Exists(sOd) Then File.Delete(sOd)
'*********************************************
myWebClient.DownloadFile(sUrlToDownload, sOd)
'*********************************************
bDownload = File.Exists(sOd)
End Function
Function bDownload(ByVal sUrlToDownload As String) As Boolean
Dim sOd As String
Dim myWebClient As New WebClient
sOd = "c:\filetostore.txt"
If File.Exists(sOd) Then File.Delete(sOd)
'*********************************************
myWebClient.DownloadFile(sUrlToDownload, sOd)
'*********************************************
bDownload = File.Exists(sOd)
End Function