Introduction
This article describes how you can use programmable C# controls in Internet Explorer without using IIS or other server program, but COM technology.
You have to place an object (identified by a classid) into the html code:
<body>>
<object classid="clsid:32F9346E-D34A-47f3-8017-B62E7EEA6CB1">
</object>
</body>
Use the same guid in the C# code of a Windows Control Library, and the following attributes before your own UserControl class.
namespace UserControlInHtml
{
[Guid("32F9346E-D34A-47f3-8017-B62E7EEA6CB1")]
[ClassInterface(ClassInterfaceType.None)]
[ProgId("UserControlInHtml.UserControl1")]
public partial class UserControl1 : UserControl
{
...
}
}
Design your controls as usual. Before build process do not forget about two check boxes:
In Assembly Information dialog check the check box for "Make assembly COM-Visible" (Properties / Application tag).
On Properties / Build tag check the check box for "Register for COM interop".
After building open your html file from IE. Using Demo project you have to register before starting IE, see the attached readme.txt file.