Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27360

VS 2010 Get url from href tag

$
0
0
I am trying to make a programI how-ever need to get the url between the href tag. There are multiple links on the site. For example.

PHP Code:

<class="sec pokeActionLink" href="/a/notifications.php?poke=1336&amp;redir=%2Fpokes%2F&amp;sr&amp;gfid=AQDv3ds4upt81JOy&amp;refid=68" data-sigil="ajaxify"><span class="mfsm">Reply</span></a

I just want the text between href="" and display in in a textbox.

I have an example code
Code:

      For Each element As HtmlElement In WebBrowser1.Document.GetElementsByTagName("a")
            If element.GetAttribute("href").Contains("/a/") Then
                textbox1.Text = textbox1.Text & element.InnerText & vbCrLf
            End If
        Next

but that just gets the text not the link

Viewing all articles
Browse latest Browse all 27360

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>