VB.NET

Moderators: seancampbell
Number of threads: 4022
Number of posts: 10035

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Load info from a web page to a vb.net application Posted by beaucequebec on 7 Oct 2008 at 7:05 AM
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 !!!
Report
Re: Load info from a web page to a vb.net application Posted by seancampbell on 7 Oct 2008 at 7:29 AM
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
Report
Re: Load info from a web page to a vb.net application Posted by beaucequebec on 7 Oct 2008 at 7:56 AM
: 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.
Report
Re: Load info from a web page to a vb.net application Posted by seancampbell on 7 Oct 2008 at 11:09 AM
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
Report
Re: Load info from a web page to a vb.net application Posted by beaucequebec on 8 Oct 2008 at 1:25 PM
: 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











 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.