0
votes

I have a newbye question about integration betweek ASP.NET (an ASCX controller) and ActiveX. I'm trying to insert SignDoc activeX in my application.

This component has a couple of dll but I cannot figure out how to insert it inside my control.

I'm using visual studio 2008 and the control is installed in a Sharepoint 2007 farm.

Thank you for any suggestion

2

2 Answers

2
votes

First, It does not matter that you host in MOSS. It is an ActiveX and it will run on the client side browser. So, as long as it has no server side part or connection, you can start testing that inside a plain asp.net page. A bad side effect is that you need to register it on every client machine either manually or include it inside a CAB file with your asp.net page

Second, You component has 2 dlls. You need to register them using regsvr32 tool. I am not sure if every dll has a COM object inside or only one has the COM and the other is helper. So, you probably need to type the following 2 lines in command prompt:

  • regsvr32 -i "full path to dll1"
  • regsvr32 -i "full path to dll2"

If one of the above commands fails no problem, but at least one should succeed

The final step is the easiest, open a blank asp.net page in VS and expand the toolbox, and right click inside empty area of the toolbox and select "Choose Items", then add your ActiveX to the toolbox, then you can simply drag it to the page. If you switch to the source view of the page you will find the object tag.

Edit: In Windows 7 you most run the console as admin in order to execute successfully the regsvr32 command.

1
votes

ActiveX are included in page using the object tag and the corresponding class id.

Read more about here: http://msdn.microsoft.com/en-us/library/ms970419.aspx