Click here to Skip to main content
15,887,923 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
So I need to get specific data in the tags within html and convert that to a string, then
display that as a label.

I am making a program that gives you data from a website.

say you went to google and typed apple
i need it to say the part where is says how many results came up. (not really what I need but good example)

I already have a webbrowser in a form that is where I need the tag information
to come from.

(webbrowser is needed for my use)
Posted
Updated 10-Feb-15 3:13am
v3
Comments
CHill60 3-Feb-15 20:31pm    
So can you post the code that you have already tried?
By the way ... "PLZ" should read "Please" to avoid confusion with the Polish currency
GuyARoss 10-Feb-15 9:13am    
Yeah, I can update it when I get home. Sorry about the 'plz' it's fixed

You can use like this to extract source of a web page:

VB
Dim inputUrl As String = "http://google.com/"
Dim stream As System.IO.Stream
Dim myRequest As System.Net.WebRequest = System.Net.WebRequest.Create(str1)
Dim resp As System.Net.WebResponse = myRequest.GetResponse
stream = resp.GetResponseStream
srRead = New System.IO.StreamReader(stream)
Dim outputHtml As String = srRead.ReadToEnd
 
Share this answer
 
See my article StringParser[^].

/ravi
 
Share this answer
 
Comments
GuyARoss 2-Mar-15 9:14am    
Can I use this API with the web-browser dll?
Ravi Bhavnani 2-Mar-15 10:13am    
Yes. It works with .NET 3.5 (and possibly older versions).

/ravi
Sounds like you're looking for the HTML Agility Pack[^].
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900