Thanks to Kaarthik & Arsalan.  A couple of followup questions...

I do not need the user to interact with the webpages the program hits
- so the overhead of System.Net.WebBrowser is somthing I am trying to
eliminate.  Two questions:

1) Given Arsalan's example, can I take the value of sHTML and force
that into an HTMLdocument object so I can use methods like
"GetElementsByTagName"?

For example:
    Dim w As System.Net.WebClient
    Dim sHTML As String
    w = New System.Net.WebClient
    sHTML = w.DownloadString("http://www.google.com";)
    dim x as HTMLdocument
    x = sHTML
    debug.print x.GetElementsByTagName("INPUT").item(2).value

2) Does the System.Net.WebClient have the ability to intereact with
the webpage?  Meaning I need to specifically enter data into text
boxes and click on buttons.  (Using the POST method - which I see it
will do - won't work for what I need.)

For example:
    Dim w As System.Net.WebClient
    Dim sHTML As String
    Dim x as HTMLdocument
    w = New System.Net.WebClient
    sHTML = w.DownloadString("http://www.google.com";)
    x = sHTML
    x.GetElementsByTagName("INPUT").item(2).value = "LookForThisValue"
    x.All.GetElementsByName("btnG").click
    sHTML = w.downloadstring()

I am sure this won't work, but does the WebClient have the ability to
recognize the objects on the page and interact with them this way or
am I barking up the wrong tree.  I am sure there is a way - obviously
if the WebBrowser control can do it, I should be able to do it without
the WebBrowser control.  I just need to know if WebClient is what I
need to research or if I have to go to a lower lever and access ports
directly and go right to the TCPIP level.  (Again, simply building a
POST transaction won't work in all cases.)

Thanks so much for your help.

Reply via email to