• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2253
  • Last Modified:

Get innerText from HTML table by looping using GetElementByID in VB.NET

Need code for VB.NET Windows Form to find innerText values in HTML table on my favorite web site using GetElementByID to find table.
0
investalert
Asked:
investalert
  • 3
1 Solution
 
Tuyau2poilCommented:
use this function to get web page into a  string. after that, you will find what you want by using standard character crtieria and vb string methods.

Shared Function getpage(ByVal url As String) As String
        Dim WC As New System.Net.WebClient()
        Dim s As System.IO.Stream = WC.OpenRead(url)
        Dim sr As New System.IO.StreamReader(s)
        Return sr.ReadToEnd()
    End Function

0
 
investalertAuthor Commented:
Thanks for your replay, I will trying it out in the next couple of days and report back.
0
 
investalertAuthor Commented:
Sorry for the delay, had some things come up. I will look at this by the end of the week and report back. Thanks.
0
 
investalertAuthor Commented:
As one needing to upgrade and educate myself to using VB.net I had to understand the difference between the Web browser control and Web client when using Win forms. Having done that and using the web client solution provided by calling the function from the form 1_load event and loading it into a multiline text box I can see all HTML from my selected URL. Now I can use a parsing method to get the desired webpage content.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now