Quantcast
Channel: .NET Framework Class Libraries forum
Viewing all articles
Browse latest Browse all 8156

Change method from Webbrowser to httpwebrequest

$
0
0

Hi all!

I've made an app that checks mac address vendor using webbrowser(getelementbyid) to fill a textbox in webpage and than get the result back.

Here is the code:

 WebBrowser1.Navigate("http://www.wireshark.org/tools/oui-lookup.html")
WebBrowser1.Document.GetElementById("ffentry").SetAttribute("value", "MAC ADDRESS")
Dim Allelements As HtmlElementCollection = WebBrowser1.Document.All
            For Each webpageelement As HtmlElement In Allelements
                If webpageelement.GetAttribute("Value") = "Find" Then
                    webpageelement.InvokeMember("click")
                End If
            Next

MsgBox(WebBrowser1.Document.GetElementById("matches").InnerText & vbNewLine)

My question is how to get this working using httpwebrequest?!I read some articles regarding httpwebrequest and I've faild doing what I needed!



Viewing all articles
Browse latest Browse all 8156

Latest Images

Trending Articles



Latest Images

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