Saturday, March 24, 2012

Open a file from URL.

Hya.

I have looked trough my classes, and I can't see any way to open a file from
a http url.

File.Open cannot take a url as parameter, but how can it be done then?

Thanks,

Brian Binnerup
Brian Binnerup wrote:
> I have looked trough my classes, and I can't see any way to open a file from
> a http url.
> File.Open cannot take a url as parameter, but how can it be done then?

Check System.Net.WebClient, it can download from a URL to a file with a
convenience method. Furthermore there is System.Net.WebRequest.
--

Martin Honnen
http://JavaScript.FAQTs.com/
Thanks,

I've got it working now ;-)

/Brian

"Martin Honnen" <Martin.Honnen@.t-online.de> wrote in message
news:%235abSBbtDHA.2244@.TK2MSFTNGP09.phx.gbl...
>
> Brian Binnerup wrote:
> > I have looked trough my classes, and I can't see any way to open a file
from
> > a http url.
> > File.Open cannot take a url as parameter, but how can it be done then?
> Check System.Net.WebClient, it can download from a URL to a file with a
> convenience method. Furthermore there is System.Net.WebRequest.
> --
> Martin Honnen
> http://JavaScript.FAQTs.com/

0 comments:

Post a Comment