Downloading a file

Hey,

This is so very much a n00b question, but I really can't find any related information because everytime I'm searching on a phrase with the word "download", I get plenty of results how to download Visual Basic or other neat stuff...

My question: I want a simple form download a specific file (URL) to a specific place (local). That's it. Please tell me in what direction I have to look.

PS: In VB6 one can do the trick with OpenURL(...)
I need .net though


Answer this question

Downloading a file

  • Brad Murray

    Everything you need for network communication is in the System.Net namespace. To download data you need to set up a HttpWebRequest and get the response. The WebResponse can return a response stream.
    To write the data from that stream to disk, use a FileStream (in the System.IO namespace).

  • Downloading a file