Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HELP! Problem with Inet Control... 3

Status
Not open for further replies.

MissouriTiger

Programmer
Oct 10, 2000
185
US
Greetings,

I am writing a VB app for a client which parses a Web page looking for a number in a certain location on the page. I've tried using the Inet control and loading the html into a rich textbox, then parsing the html from the rich textbox.

Unfortunately, this won't work, because the html that loads via the Inet control isn't the same html that loads in the browser (probably an issue with cookie or IP address detection) and the number I need to parse for isn't there. I need the exact same web page that one sees in the browser.

So, I tried placing a browser control on the form and it loads the normal web page like I hoped, but I can't figure out how to get at the html in the browser control to parse it.

Is there some way to get the html from the browser control over to the rich textbox? Or is there some other way around this?

Whoever solves this problem, lunch is on me!

-Greg

Greg Norris
Software Developer

________________________________________________
Constructed from 100% recycled electrons.
 
[tt]WebBrowser1.Document.body.outerHTML[/tt]

Gives you the HTML content for <BODY>...</BODY> tag.
Anything outside these tags (like <HEAD> and <HTML>) will not be visible.
 
Wow, thanks a bunch!

I thought it would be something like that. I remember the DOM, but I'm so rusty on this stuff.

Question: Can you direct me to a good comprehensive resource on this subject?

Question2: I'm also looking for an in-depth resource for Regular Expressions in VB (I'm currently using VB).

Thanks again, and when should I buy you that lunch I promised?



Greg Norris
Software Developer

________________________________________________
Constructed from 100% recycled electrons.
 
Thank you all for the help and tips! I gave you guys each a vote.

Peace!


Greg Norris
Software Developer

________________________________________________
Constructed from 100% recycled electrons.
 
Thanks!

Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top