Gentlemen,
I have an issue regarding collecting address data from webpage (telephone directory with have name,address,phone, speciality and Map location). I need to do vb.net application that collects all of these data to my application.
The issue i face now is to read extract teh html code to names, Also, to get teh map location , I have to click teh map button for each person to get the coordindates of this location .
How can I implement this in vb.net .
my code I did so for is :
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
getHTML("http://www.140online.com/mClasses/162/%D8%A7%D8%B7%D8%A8%D8%A7%D8%A1")
End Sub
Private myWebResponse As Net.HttpWebResponse
Private myStream As IO.Stream
Private myReader As IO.StreamReader
Private Sub getHTML(ByVal siteURL As String)
Me.Cursor = Cursors.WaitCursor
Try
myWebResponse = CType(Net.HttpWebRequest.Create(siteURL).GetResponse, Net.HttpWebResponse)
myStream = myWebResponse.GetResponseStream()
myReader = New IO.StreamReader(myStream)
extractHTML(myReader.ReadToEnd, ListBox1)
myReader.Close()
myStream.Close()
myWebResponse.Close()
Catch ex As Exception
MsgBox("There was a connection problem.", MsgBoxStyle.Critical)
End Try
Me.Cursor = Cursors.Default
End Sub
Private iSi, iEi As Integer, arTemp(), sTemp, sItemToAddToListBox As String
Private Sub extractHTML(ByVal htmlContent As String, ByVal selListbox As ListBox)
' ??? how to parse it , eg with the HTML agilityPack from Codeplex ?
End Sub
End Class