Hi

How can I read an html file into a string variable?

Thanks

Regards

Re: Reading html by sloan

sloan
Thu Mar 13 18:34:16 CDT 2008


I'm gonna assume you mean..over the internet/wire?

http://msdn2.microsoft.com/en-us/library/fhd1f0sw.aspx

WebClient for 2.0 or greater.

1.1 , check out the HttpHelper class ( custom solution)
http://groups.google.com/groups/search?hl=en&q=HttpHelper+sloan





"John" <John@nospam.infovis.co.uk> wrote in message
news:uQVkPGWhIHA.1204@TK2MSFTNGP03.phx.gbl...
> Hi
>
> How can I read an html file into a string variable?
>
> Thanks
>
> Regards
>



Re: Reading html by John

John
Thu Mar 13 18:41:36 CDT 2008

no just from the local disk

Thanks

Regards

"sloan" <sloan@ipass.net> wrote in message
news:%236HB1JWhIHA.2304@TK2MSFTNGP05.phx.gbl...
>
> I'm gonna assume you mean..over the internet/wire?
>
> http://msdn2.microsoft.com/en-us/library/fhd1f0sw.aspx
>
> WebClient for 2.0 or greater.
>
> 1.1 , check out the HttpHelper class ( custom solution)
> http://groups.google.com/groups/search?hl=en&q=HttpHelper+sloan
>
>
>
>
>
> "John" <John@nospam.infovis.co.uk> wrote in message
> news:uQVkPGWhIHA.1204@TK2MSFTNGP03.phx.gbl...
>> Hi
>>
>> How can I read an html file into a string variable?
>>
>> Thanks
>>
>> Regards
>>
>
>



Re: Reading html by Herfried

Herfried
Thu Mar 13 19:12:36 CDT 2008

"John" <John@nospam.infovis.co.uk> schrieb:
> How can I read an html file into a string variable?

'My.Computer.FileSystem.ReadAllText'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Re: Reading html by kimiraikkonen

kimiraikkonen
Fri Mar 14 03:46:42 CDT 2008

On Mar 14, 2:12=A0am, "Herfried K. Wagner [MVP]" <hirf-spam-me-
h...@gmx.at> wrote:
> "John" <J...@nospam.infovis.co.uk> schrieb:
>
> > How can I read an html file into a string variable?
>
> 'My.Computer.FileSystem.ReadAllText'.
>
> --
> =A0M S =A0 Herfried K. Wagner
> M V P =A0<URL:http://dotnet.mvps.org/>
> =A0V B =A0 <URL:http://dotnet.mvps.org/dotnet/faqs/>

Note that ReadAllText or StreamReader reads the HTML with html code
that has to be processed in a browser if you want, so if you only need
specific text except html codes, use webbrowser control then select
and copy the content.