Disable image loading in WebBrowser-Control C # .Net 2.0+

I am using vs2008 and I would like to disable image upload on my webbrowser control, but I see no solution other than WebBrowserEX, which does not look outside of .net 1.1.

Does anyone know how to do this? Thanks!

+3
source share
2 answers

you should replace its tag, try the following code

var html = webBrowser.DocumentText;
var newOne = Regex.Replace(html, "<img.*/>", "", RegexOptions.Multiline);
webBrowser.DocumentText = newOne;
0
source
0
source

Source: https://habr.com/ru/post/1714871/


All Articles