Search code examples
mshtml

Modifying Request/Response Streams in WebBrowser Control Using MSHTML


I need to find a way to get at the request/response streams inside of the webbrowser winforms control and see that it's not real intuitive. For example, I need to be able to modify post data when a user clicks a submit button. It looks like you have to register for some MSHTML COM events to do so, but am unsure which I need to subscribe to (and how). Has anyone done this in the past? Examples?


Solution

  • Take a look at Asynchronous Pluggable Protocols (IInternetProtocol):

    http://msdn.microsoft.com/en-us/library/aa767743(VS.85).aspx

    And a solution in C# that uses some of it for its own protocols in IE:

    http://www.codeproject.com/KB/aspnet/AspxProtocol.aspx