Embedding WinForms controls in IE

I’ve had to dig this up several times before, so it’s about time I blogged it.

You can embed a .NET WinForms control directly into a Web page, much like a Java applet or an ActiveX control. It only works in IE, but unlike ActiveX, there’s no security prompt and nothing to install. (Obviously, it runs in a sandbox, so it can’t access your hard drive or anything.) You also have to be careful about what events you hook and suchlike; the security model is pretty restrictive (I’ve blogged about this before).

Anyway, here’s how to embed a UserControl into Internet Explorer.

Leave a Reply

Your email address will not be published. Required fields are marked *