

This means that we won’t be able to create instances of our ActiveX class with JavaScript by default. } Mark the control as safe for scripting and initializationīy default IE will not allow initializing and scripting an ActiveX control unless it is marked as safe. Public class HelloWorld : UserControl, IHelloWorld This is what the file might look like: using System Make the HelloWorld class implement the IHelloWorld interface and have the GetText() method return a string of your choice.

Make the control class implement the new interface let's us manually assign a GUID to the interface. Edit the ‘IHelloWorld.cs’ file so it looks like this: using System
