Glossary Item Box
There is a fairly standard way to embed .NET Windows Forms controls on web pages. This topic gives a brief explanation of how to do this with the Note control.
The first step is to create an HTML document with an object tag to insert and activate the control. This is a sample object tag that inserts the Note control.
<OBJECT id="noteControl" width="100%" height="100%"
classid="Agilix.Ink.Note.dll#Agilix.Ink.Note.Note">
<param name="BackColor" value="Pink"/>
</OBJECT>
The classid has two interesting parts; the path to the control library and the fully qualified name of the control separated by the pound sign. The combination of path and fully qualified class name serve as the unique identifier.
Use "param" tags to set properties on the control. The name attribute is the name of the property and the value attribute is the value of the property.
To gain programmatic access to the control, you can write script against it.
Create a new virtual directory and populate it with both the control DLLs (Agilix.Ink.Common.dll, Agilix.Ink.dll, and Agilix.Ink.Note.dll) and the HTML document.
Important: Set execution permissions on the virtual directory to scripts. The control will not be properly activated if the execution permissions are set to scripts and executables.
You may need to configure Internet Explorer or alter security policy on the client machine to allow your web page to run. One way to enable a specific site for control download and execution is to identify your hosting page as belonging to the Trusted zone. This change is done in Internet Explorer with the following steps.
1. Choose Tools..Options from the main menu.
2. Select the "Security" tab.
3. Select the "Trusted Sites" icon.
4. Click the Sites button.
5. Add your site using the dialog.
6. Click OK to save your changes.
Now, when you browse to that page, it should be in the Trusted Sites zone which has the Internet permission set by default.
You can also configure the .NET framework security policy to enable code to run from a particular web site or from the Internet. The SDK documentation contains details of how to configure security policy.