<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'> <html> <head> <title>Testing</title> </head> <body> <div id="content"> <p>demo</p> <area alt="Open for 1" href="region.php?reg=1"> <area alt="Closed href="region.php?reg=2"> <area alt="Closed" href="region.php?reg=3""> <area alt="Closed" href="region.php?reg=4"> <area alt="open for 2" href="region.php?reg=5"> <area alt="closed" href="region.php?reg=6"> <area alt="closed" href="region.php?reg=7"> <area alt="closed" href="region.php?reg=8"> <area alt="open for 3" href="region.php?reg=9"> <area alt="open for 4" href="region.php?reg=10"> <area alt="closed" href="region.php?reg=11"> <area alt="open for 5" href="region.php?reg=12"> </div> </body> </html>
applications code:
Private FindThese As String() = {"open for 3", "open for 1"}
Dim Items = _
( _
From T In WebBrowser1.document.GetElementsByTagName("area").Cast(Of HtmlElement)() _
Where T.GetAttribute("href").ToString.ToLower.Contains("region.php?reg=") AndAlso _
FindThese.Contains(T.GetAttribute("alt").ToString.ToLower) _
Select Link = T.GetAttribute("href"), Alt = T.GetAttribute("alt") _
).ToList
ListBox1.DisplayMember = "link"
ListBox1.DataSource = Items
I'm using a listbox as a debugging tool to see what data gets pulled for use. The end result will be using the list to navigate webbrowser1.
The goal is to read the HTML, locate the <area> tags with the desired values, snag the links associated with them, and navigate webbrowser1 to the corresponding page.
Everythings going well except for ONE issue: the resulting data pulled is:

one way or another, i need to figure out how to remove the "about:" portion so i can use it to navigate webbrowser1 to "www.***.com/region.php?reg=X"
currently the result is webbrowser1 attempts to go to "www.***.com/about:region.php?reg=x", which obviously is not going to work.
lots of googling and tinkering has yielded absolutely no answers as to why im getting this

New Topic/Question
Reply



MultiQuote






|