Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

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

I need to fill a listview on VB app with table data from a web page.

I am wanting to make a simple VB app that weill let me when I click a get button it will go to a web site and pull in all the data from the table there and show it in a listview on the form.

the webpage is


right now Ihave it to where i get the whole web page as a string but its not what i was wanting.
 Private Sub btnPrices_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrices.Click
        Dim fullpath As String = "http://mospublic.ercot.com/ercot/jsp/balancing_services_mcp.jsp"
        Dim req As Net.HttpWebRequest '
        Dim res As Net.HttpWebResponse
        Dim sr As IO.StreamReader
        Dim strResult As String
            ' Create request for the web stream
            req = CType(Net.WebRequest.Create(fullpath), Net.HttpWebRequest) ' Return request in a response stream
            res = CType(req.GetResponse(), Net.HttpWebResponse)
            sr = New IO.StreamReader(res.GetResponseStream(), System.Text.Encoding.ASCII) 'Put the results in one big string
            strResult = sr.ReadToEnd()
        Catch ex As Exception
            strResult = "Exception occured"
        End Try 'return the results
    End Sub
End Class

Open in new window

1 Solution
Bob LearnedCommented:
It sounds like you need to find an HTML parser, to get the data that you want from the response text.

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

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