how to use ActiveX in Asp .net?

F

FanTian

I want to insert an ActiveX control into asp .net web page, but it seems I
fall in trouble now.
When I insert the ocx control into toolbox and drag it to the web page, I
can't get its ID. and if I use the interop dll transformed with aximp.exe
from the ocx, I can't insert it into the tool box.
who can tell me what to do?
Thanks a lot!
 
K

Kevin Spencer

An ActiveX Control is not a .Net assembly, so you certainly can't expect
Visual Studio to treat it like one. An ActiveX Control is a component that
is downloaded by the browser and executed by the browser. It is embedded in
a web page in much the same way that an image is embedded in a web page, by
constructing an <OBJECT> tag in the HTML, which points to and configures the
ActiveX control after the browser has downloaded and installed it on the
client.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
S

Sebastien Lambla

FanTian said:
I want to insert an ActiveX control into asp .net web page, but it seems I
fall in trouble now.
When I insert the ocx control into toolbox and drag it to the web page, I
can't get its ID. and if I use the interop dll transformed with aximp.exe
from the ocx, I can't insert it into the tool box.
who can tell me what to do?
Thanks a lot!

Simple question to answer: Are you trying to use an activex component as
a server side object or as a client side object? aka do you want to call
the activeX object from the server side to process something or do you
want to have activex object inside your web page?

For the first, you need to create an interop dll that you get from
aximp.exe and reference it from your project (Add Reference in visual
studio should generate the interop dll for you).

For the second, you can just include the activex object as an object tag
in the html view of your page. In this case, you cannot manipulate the
object itself, just the tag, from the server side.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,740
Latest member
JudsonFrie

Latest Threads

Top