I have created a simple web browser using c# and I want to block the images to appear on WebBrowser control. Can you please show me a sample code for this? Thanks in advance.
+2
A:
You can remove image-tags from the source htm like this:
string content = new WebClient().DownloadString(@"http://www.google.com/");
string contentWithoutImages = Regex.Replace(content, @"<img(.|\n)*?>", string.Empty);
webBrowser1.DocumentText = contentWithoutImages;
Trond
2010-03-06 08:21:45
@Trond What about images without img tags? css sprites for example
Sergey Mirvoda
2010-03-06 08:24:01