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

Get HtmlElementCollection From HttpWebRequest

$
0
0
So im using this function to go to websites
Code:

Function Website(ByVal Link As String, ByRef Cookie As CookieContainer)
        Dim request As HttpWebRequest = DirectCast(WebRequest.Create(Link), HttpWebRequest)
        request.CookieContainer = Cookie
        Dim response As HttpWebResponse = DirectCast(request.GetResponse(), HttpWebResponse)
        Return 0
    End Function

it loads login cookie from a site and then goes to the link that I want it to eg like this
Code:

Website("www.gohere.com", LoginCookie)
My question is how do I then get a HtmlElementCollection from the site I just went to...
similarly to how you can get the following HtmlElementCollection from a webbrower as show bellow

Code:

Dim PageElements As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("a")
Thanks In Advance Sincerely John

Viewing all articles
Browse latest Browse all 27199

Trending Articles



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