WebClient wc = new WebClient();
byte[] b = wc.DownloadData(urlToYourResource);
wc.Dispose();
string strContent =
System.Text.Encoding.UTF8.GetString(b);
--Peter
-

Signature
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com
> I am planning to stage couple small text files in one of my personal
> web site. Which is running in linux. I writing a .net app, I want to
[quoted text clipped - 3 lines]
>
> Thanks a lot.
DBC User - 29 Aug 2006 19:55 GMT
Hi Peter,
Thanks for the help. One quick question, do I need to setup anything on
my server so that anyone read this file?
Thanks again.
Peter wrote:
> WebClient wc = new WebClient();
> byte[] b = wc.DownloadData(urlToYourResource);
[quoted text clipped - 17 lines]
> >
> > Thanks a lot.
Mel - 29 Aug 2006 20:33 GMT
No, you do not need to setup anything on the your server.
> Hi Peter,
> Thanks for the help. One quick question, do I need to setup anything on
[quoted text clipped - 22 lines]
>> >
>> > Thanks a lot.
DBC User - 30 Aug 2006 16:16 GMT
Thanks.
> No, you do not need to setup anything on the your server.
>
[quoted text clipped - 24 lines]
> >> >
> >> > Thanks a lot.
Joerg Jooss - 29 Aug 2006 20:01 GMT
Thus wrote Peter Bromberg [C# MVP],
> WebClient wc = new WebClient();
> byte[] b = wc.DownloadData(urlToYourResource);
> wc.Dispose();
> string strContent =
> System.Text.Encoding.UTF8.GetString(b);
> --Peter
With .NET 2.0, you can also use DownloadString():
WebClient wc = new WebClient();
wc.Encoding = Encoding.UTF8;
string content = wc.DownloadString(url);
Cheers,

Signature
Joerg Jooss
news-reply@joergjooss.de