By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,312 Members | 1,214 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,312 IT Pros & Developers. It's quick & easy.

how to use ActiveX in Asp .net?

P: n/a
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!
Nov 18 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
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.

"FanTian" <su******@126.com> wrote in message
news:ui*************@tk2msftngp13.phx.gbl...
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!

Nov 18 '05 #2

P: n/a
FanTian wrote:
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.

--
Sebastien Lambla [TheTechnologist]
The Geeky Lazy Bloggy
http://blog.thetechnologist.net
Nov 18 '05 #3

P: n/a
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.

"FanTian" <su******@126.com> wrote in message
news:ui*************@tk2msftngp13.phx.gbl...
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!

Nov 18 '05 #4

P: n/a
FanTian wrote:
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.

--
Sebastien Lambla [TheTechnologist]
The Geeky Lazy Bloggy
http://blog.thetechnologist.net
Nov 18 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.