How to download a file in .NET using iNET control?

  • Thread starter Thread starter _RIP_DREAMS
  • Start date Start date
Code:
Dim bImage() As Byte

' get the binary data
bImage = Inet1.OpenURL("URL")

' save it to file
Open "c:\windows\desktop\temp_image.dat" For Binary As #1
  Put #1, , bImage
Close #1
That works in VB6, but it should be the same (or very similar) for .NET (I hope :))
 
Don't use it. There are new methods to do what you achieve in .NET, and you do not get a license to use that control with the .NET framework.

Try checking out the HttpRequest and HttpResponse classes, or possibly the System.Net.Sockets namespace if you'd rather do it manually.
 
Back
Top