问题
I am using vs2008 and I would like to disable image loading on my webbrowser control but I dont see any solution except for the WebBrowserEX which doesn't seem outside of .net 1.1.
Anyone know how to do this? Thanks!
回答1:
you should replace its tag , give the following code a try
var html = webBrowser.DocumentText;
var newOne = Regex.Replace(html, "<img.*/>", "", RegexOptions.Multiline);
webBrowser.DocumentText = newOne;
来源:https://stackoverflow.com/questions/1260615/disable-image-loading-on-webbrowser-control-c-sharp-net-2-0