I’ve recently been experimenting with C#s webbrowser and my curiosity has been peaked.. How does the browser actually access the webpage’s code? I mean, the html, php, javascript, ajax, what have you.. How does it access it and can anyone give me a coding example of how to access it myself?
I’ve recently been experimenting with C#s webbrowser and my curiosity has been peaked.. How
Share
This is an awfully high level question that can only be answered with low level answers. Too much to answer with in a StackOverflow reply.
The Web Browser component is an ActiveX component that is hosted by Shdocvw.dll. See this MSDN article about how Internet Explorer works.
This question isn’t very specific to C# at all, as the WebBrowser control does what it does the same way it does it in IE – its the same control.
If you’re unfamiliar with how a browser works, sockets, TCP, or networking in general, then you may not be able to understand how it does anything that it does.
Also: PHP is a server-side language. It is processed on the server before any data it transferred to the client.
If you’re after a C# example on downloading the content of a website, you can look at plenty of examples already here on StackOverflow and MSDN, namely here: WebClient Class – MSDN.