Thread View: borland.public.csharpbuilder.webservices
2 messages
2 total messages
Started by Victor
Thu, 24 Jun 2004 12:46
About Web Linking
Author: Victor
Date: Thu, 24 Jun 2004 12:46
Date: Thu, 24 Jun 2004 12:46
4 lines
965 bytes
965 bytes
Dear all Anyone could tell me how can I extract the contents of outside web site in my html file, how can i write it? thanks
Re: About Web Linking
Author: Eric
Date: Thu, 24 Jun 2004 13:42
Date: Thu, 24 Jun 2004 13:42
19 lines
1288 bytes
1288 bytes
Victor wrote:
> Anyone could tell me how can I extract the contents of outside web
> site in my html file, how can i write it?
It sounds like you want a web scraper. I'm not sure where you want to
write it to, but it's easy to read a specified web page in C#.
But I wouldn't do it from inside your html page - this kind of code
belongs in your code-behind file.
This will read a specified web page from inside your code-behind file:
WebClient w = new WebClient();
StreamReader sr = new StreamReader(
w.OpenRead("http://www.site.com/page.htm"));
String s = sr.ReadToEnd();
Eric
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads