add a comment
A C# assembly can be easily exposed as an Active-X control using the object tag like so:
<OBJECT id=”Bob” classid=”url to assembly#full name of control></OBJECT>
So for example my assembly is located in a virtual directory on server VM2003S2:88 called MyObject. MyObject has a namespace of Chris.ActiveX.Controls and the class is MyControl. My object tag would be: http://vm2003s2:88/myobject.dll#chris.activex.controls.mycontrol
The assembly is automatically pulled down to the download cache which is located in c:\windows\assembly\downloads on Win2003. Unfortunately, its not smart enough to read version strings and realize a newer copy is available on the server. Therefore you must clear this cache using:
But that’s not all! A copy is also made in your temporary internet files. You won’t be able to simply delete it using del from the post-build event as Window’s treats the directory as special. So either write a small program utilizing the API to delete your assembly from the cache or use one of the miriad of privacy utilities to clean this for you. I found CleanUp! which can be quietly executed from the command line and added to my post build event. The result is the assembly is pulled every time (on the development machine) so you see your changes with each build.
Here is a good example explaining Embedded Windows User Controls into Internet Explorer: