WebControl problem.

  • Thread starter Thread starter rc
  • Start date Start date
R

rc

I am trying to iterate through the elements of a HTML
document loaded in a WebControl on a WinForm. I have
found many exemples and most of them are like the
following piece of code. Unfortunally this only catch the
tags HTML, STYLE, SCRIPT, HEAD and TITLE. I need to get
all the elements on the page specially the INPUT tags.
What am I missing?

Dim htDoc As mshtml.HTMLDocument
Dim oTags As Object
htDoc = webBrowserControl.Document
For Each oTags In htDoc.All
MsgBox(oTags.tagName)
Next
htDoc = Nothing
 
Figured i would answer myself. This code was in
NavigateCompleted instead of DocumentCompleted...
 
I had the same problem, but for what I ended-up using actually worked for
me.
I used the webbrowser.body.innerhtml property instead. That gave me the
entire html of the web-page. I too tried finding examples and found the same
ones you did, they didn't work for me either - but the method I described
works, but does then require you to parse out the text unfortunately.

Nate
 
Back
Top