Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Load info from a web page to a vb.net application

beaucequebecbeaucequebec Posts: 4Member
I just want to know if it is possible to load info's from a web page
with a windows application (vb.net).
If someone can insert code samples it will be nice.
Thanks for any help !!!

Comments

  • seancampbellseancampbell Pennsylvania, USAPosts: 684Member ✭✭✭
    What exactly do you mean by load info's from a web page? Are you looking to display specific information about webpages that you visit through a vb.net application? Maybe if you describe what you are trying to do I can assist you.

    FireSickle.com
  • beaucequebecbeaucequebec Posts: 4Member
    : What exactly do you mean by load info's from a web page? Are you
    : looking to display specific information about webpages that you
    : visit through a vb.net application? Maybe if you describe what you
    : are trying to do I can assist you.
    :
    : FireSickle.com



    I want to take a field information on a web page and display it in my windows application (ex: the total points of a hockey player)

    find the field with innerhtml or something like that.
    Sorry for my english im from quebec.
  • seancampbellseancampbell Pennsylvania, USAPosts: 684Member ✭✭✭
    Your english is fine. I think I have an idea for what you are doing. If the site you are hitting has generally the same layout (source code wise) then It would be easy to grab this information. Typically when I write software to skim webpages I start by finding the value myself visually in the source code, then checking to see what characters lead up to that value. If they are the same, then we can automate grabbing the value.

    Take a bit of time and search for the data inside the source code of a page. Once you determine where the field is located, paste that section of HTML into code and /code tags.

    Meenwhile I will get together some information on loading Webpage Source into memory from a VB.Net Application.

    Firesickle.com
  • beaucequebecbeaucequebec Posts: 4Member
    : Your english is fine. I think I have an idea for what you are doing.
    : If the site you are hitting has generally the same layout (source
    : code wise) then It would be easy to grab this information. Typically
    : when I write software to skim webpages I start by finding the value
    : myself visually in the source code, then checking to see what
    : characters lead up to that value. If they are the same, then we can
    : automate grabbing the value.
    :
    : Take a bit of time and search for the data inside the source code of
    : a page. Once you determine where the field is located, paste that
    : section of HTML into code and /code tags.
    :
    : Meenwhile I will get together some information on loading Webpage
    : Source into memory from a VB.Net Application.
    :
    : Firesickle.com


    Thanks for the help i found something with the source code :


    I load a webbrowser with the web page that i want the source code then i extract the data :


    Private Sub RemplirPoints1(ByVal wb As WebBrowser, ByVal pts As Label)

    dim nbrPts As String
    dim annee As String
    dim html As HtmlDocument

    html = wb.Document

    'search the year
    annee = html.GetElementsByTagName("nobr").Item(1).InnerText

    'search the pts by the player
    nbrPts = html.GetElementsByTagName("td").Item(24).InnerText


    If annee = "08-09" Then
    pts.Text = nbrPts

    Else
    pts.Text = "0"

    End If
    End Sub








Sign In or Register to comment.