473,395 Members | 1,726 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

load all HTML into string....

hey, I want to get the entire contents of an HTML page, and put all the html
code it returns in a string. so that I can parse that string for data,

how would I go about doing this? would I need to use a web browser control ?
any help/advise ? thanks.
Sep 9 '07 #1
2 3477
Rogelio,

You can use the WebClient class in the System.Net namespace, or, if you
need more control over the request, you can use the
HttpWebRequest/HttpWebResponse classes.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Rogelio" <Ro*****@discussions.microsoft.comwrote in message
news:3B**********************************@microsof t.com...
hey, I want to get the entire contents of an HTML page, and put all the
html
code it returns in a string. so that I can parse that string for data,

how would I go about doing this? would I need to use a web browser control
?
any help/advise ? thanks.
Sep 9 '07 #2
Rogelio wrote:
hey, I want to get the entire contents of an HTML page, and put all the html
code it returns in a string. so that I can parse that string for data,

how would I go about doing this? would I need to use a web browser control ?
any help/advise ? thanks.
(Http)WebRequest Create, wrap the resulting Stream in a StreamReader and
use ReadToEnd.

Arne
Sep 9 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: rosty | last post by:
I am loading a page in the constructor of my form to the Microsoft Web Browser component: string URI = "http://some_address.org"; object flags = 0; object targetframe = ""; object headers = "";...
2
by: Mark Kamoski | last post by:
Hi-- I need a code sample of how to redirect from an ASP.NET page to a frames-based html page and specifying what should load in the destination's frames. Any ideas? (Even air-code is much...
1
by: Biva | last post by:
Hello, I have a drop down list control in a datagrid. I can't seem to populate the control. Here is what my code looks like: <EditItemTemplate> <asp:DropDownList ID= "ddlUser5" DataSource =...
2
by: Sam | last post by:
I have a custom control (MyTextBox - taken from Microsoft website) that implements the IPostBackDataHandler interface. It is added to the controls collection of a placeholder control during the...
26
by: Niggy | last post by:
I am trying to load a file from a dropdownlist, however I get a error saying a virtual path is required. An example selected value would be "../4900/myfile.doc". Any ideas - my code is. Dim...
12
by: Dean Slindee | last post by:
My project has a main form (frmMain, the startup object for the project) and several other "child" forms that are painted within a large panel on frmMain. In each form's Form_Load event, a Weak...
2
by: David Virgil Hobbs | last post by:
Loading text strings containing HTML code into an HTML parser in a Javascript/Jscript I would like to know, how one would go about loading a text string containing HTML code, so as to be able to...
4
by: Dick Sutton | last post by:
I am so close, yet oh so far! Here's the problem: I want to load a string variable that contains HTML into an instance of SHDocVw.InternetExplorer. Here's what I have so far: Function...
5
by: Jesper | last post by:
Hi, Is there an alternative to an URI location when loading html into a webBrowser control. I have some html generated in a string. I would like to skip saving the string to a file on disk...
9
by: =?Utf-8?B?VGhvbWFzIFcuIEJyb3du?= | last post by:
"parez" wrote: Assembly.LoadWithPartialName does indeed work!! Now, why is this incredibly useful routine deprecated and we are instructed to use Assembly.Load instead which does not provide...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.