tags:

views:

88

answers:

2

We have a 3rd party ActiveX control namely Autodesk's "Design Review" that we would like to use in a non aspx environment. Most functionality is available through javascript, however one key method cannot be called from that environment. Searching on the Autodesk forums we found a solution that involves creating a COM wrapper around the control. I would assume that wrapper would then make the necessary modifications to the arguments passed in from javascript.

I assume this could be done by creating a C++ COM object wrapping the control. My question though is, can this be done in c# .net? We don't want to embed the control in a Windows form and pop it up on the web page. We can actually do this easily. What we want is to embed the control in the web page.

Thanks in advance for your help!

A: 

ActiveX is COM so the technology for embedding it in a page has not change for 10-12 years ago. It is just plain HTML, with Object tag. This is pre-.NET and .NET has not made any enhancements last time I checked.

You can run C# and host it in IE and use ActiveX like that but you do not want to do it.

Have a look here:

http://www.w3schools.com/TAGS/tag_object.asp

I must say, however, that with all the limitations on running ActiveX in IE - because it was a security hole - it will not be a pleasant user experience for its users.

Aliostad
Thanks, but this is not the problem. The problem is creating a wrapper around the control to provide additional functionality.
Forrest
A: 

You can create a an assembly from the activex control using Windows Forms ActiveX Control Importer

sgrassie
Thanks for this lead. Would that allow me to host in the web page and not a windows form?
Forrest
I'm not sure, to be perfectly honest; if it's webforms then maybe, it's not something that I've ever needed to do. You could at least wrap the activex control and then wrap the generated assembly with additional functionality (or use extension methods), and go from there.
sgrassie