Intercepting requests made by WebBrowser in C#

12,343

There is an event called "BeforeNavigate2" that is called before any request is made. You can use this to modify the outgoing requests.

Share:
12,343
AstroCB
Author by

AstroCB

I don't really have much to say here.

Updated on June 15, 2022

Comments

  • AstroCB
    AstroCB almost 2 years

    Is it possible to intercept all requests made by a WebBrowser control?

    I want to modify the request URI of every single request (including requests for images, scripts, stylesheets, etc.)

  • Admin
    Admin almost 15 years
    Is it called before any request, or before each page change? By request I mean the individual requests for images, css, etc.