WebBrowser stops responding to a specific webpage, but IE does not

If you create a WinForms application and add a control WebBrowserand go to this page:

http://www.llrx.com/features/deepweb2010.htm

The application will stop responding. IE, Chrome, and Mozilla will not do this. Any idea of ​​"what am I doing wrong"?

+3
source share
2 answers

The following are the CSS lines below:

/* MSIE PC */
#logo a { background-image: expression(this.runtimeStyle.backgroundImage = "none", this.innerHTML = '<img src="http://www.llrx.com/themes/llrx/images/logo.gif" border="0" alt="' + this.innerHTML + '">'); }
#tagline a { background-image: expression(this.runtimeStyle.backgroundImage = "none", this.innerHTML = '<img src="http://www.llrx.com/themes/llrx/images/h2.gif" border="0" alt="' + this.innerHTML + '">'); }

You assign node to the innerHTMLattribute ALT, but it innerHTMLcontains unscreened HTML, so you end up creating very funky HTML, for example:

<img alt="<img alt="<img alt="<img alt="

A screenshot might seem better:

enter image description here

+1
source

He is right.

            WebBrowser wb = new WebBrowser();
            wb.Parent = this;
            wb.Visible = true;
            wb.Navigate("C:\Test.html");

With the smallest html form:

<!DOCTYPE html>
<html>

<head>
    <base href="http://www.llrx.com/" />
    <style type="text/css" media="all">@import "/themes/llrx/style.css"; #beta2fix a:hover {color: #000;}</style>
</head>
<body>

<div>
    <h1 id="logo"><a href="/">Test</a></h1>
</div>

</body>
</html>

Damn if I know why (for now).

+1
source

All Articles