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

Posted on 2008-11-05
Last Modified: 2013-11-07
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 = ""

        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

Question by:jlcannon
    1 Comment
    LVL 96

    Accepted Solution

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

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    It’s quite interesting for me as I worked with Excel using for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
    For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK ( for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now