Deploying your Inkable Web Application
So far, you have been working with all of this code in the Visual Studio IDE. There is one more important step to ink-enabling your applications and that is getting them out onto the Web. The Web application gets deployed just as you would any other Web application.
However, the
dll for your Windows Forms control is a little different. With yet another reminder that this is not server-side code, you only need to copy it into the directory along with the Web page that it gets embedded on, just like you would do with an image file. It is possible to tuck it into a folder, but be sure to modify the
classid of the
<object> tag so that the
dll can be found. For example, if you place the
dll into a folder called
inkControls on the server, the
classid would look like this:
Classid=inkControls/CoDe_InkControl.dll#
CoDe_InkControl.InkontheWeb.InkWebControl
Some Basic Rules
Now that you've seen the process, here are some basic rules for using Ink on the Internet:
- Use in Internet Explorer only.
- Use a custom WinForms control.
- Do not use any objects in the control that require Full Trust, including all unmanaged objects such as Windows pointers.
- Remember to dispose objects in the control.
- Embed the control on a Web page using the <object> tag.
- Copy the control to the same location as the Web page, or to a subfolder.
Be sure to use the latest Tablet PC SDK, version 1.7. You can
download it from the Mobile Developer Center.
There are many ways to move Ink around on the Web. You need to consider postbacks, and sending ink data to another page, to a database, to a Web service, or just saving it as an image. See "
Persisting Ink on the Web" on the Mobile Developer Center for more information.
This article has introduced you to the key steps of adding Ink to your Web applications. You have learned some important concepts about security that will help you with troubleshooting. You have also learned how to build functionality into the control for internal use or to be exposed to the Web page.
With these new tools, you can now give even more power, creativity, and enterprise solutions to your Tablet PC users.
Be sure to check out my two inkable Web applications, "Doodling on the Web" and "Virtual Earth Does Ink!" at
http://www.thedatafarm.com/ink.aspx. You can also download the code samples for this article from that link.