Hello every one, i have been racking my brain trying to get this to work for days now but still cant find an answer.
I am scraping my web page for links which are directly linked to files , i can get all the links to list into a richtextbox, but i would like only the file name to show and not the path but still remain clickable to the original link, any help would be very much appreciated
heres my code so far
Thanks in advance
I am scraping my web page for links which are directly linked to files , i can get all the links to list into a richtextbox, but i would like only the file name to show and not the path but still remain clickable to the original link, any help would be very much appreciated
heres my code so far
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
WebBrowser1.Navigate("http://www.blahblahblah.blah")
End Sub
Private Sub WebBrowser1_DocumentCompleted(sender As Object, e As WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
Dim PageElements As HtmlElementCollection = WebBrowser1.document.GetElementsByTagName("a")
RichTextBox1.DetectUrls = True
For Each CurElement As HtmlElement In PageElements
RichTextBox1.Text = RichTextBox1.Text.Replace("@", " ") & CurElement.GetAttribute("href") & Environment.NewLine
Next
End Sub
Thanks in advance