Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 5th, 2003, 11:50 AM
Registered User
 
Join Date: Dec 2003
Location: Miami, FL, USA.
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Activex controls in asp.net

Hello All:
I need to use an activex control in a web application that I am designing. I've read that I can go two ways:
1. I can add a reference, which creates a wrapper, and then I can instantiate objects dynamically using the wrapper. In this case the control will be running in the server.
2. I can add the activex using the toolbox of the .net visual studio designer. This creates an object tag in html. In this case the control will run in the client side.
How do I instantiate the object in the second case? Do I have to use a script language like java script? Can anybody provide me with an example?

  #2 (permalink)  
Old December 7th, 2003, 01:07 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , .
Posts: 540
Thanks: 0
Thanked 4 Times in 4 Posts
Default

If all you want to do is use your ActiveX control in a web page then just add the following line:

<OBJECT ID="Object1" CLASSID="CLSID:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" CODEBASE="OCX_Name.OCX"></OBJECT>

The ClassID you can find by doing a search in the registry by searching for the name of your OCX file. Copy and paste that value in the spot where you see the all of the x's above.

The Codebase tag specifies where the OCX file is located in relation to your page. This is for machines that are connecting to your site so their system knows where to download the file.

Hope this helps and is what you are looking for.

J
  #3 (permalink)  
Old December 8th, 2003, 10:33 AM
Registered User
 
Join Date: Dec 2003
Location: Miami, FL, USA.
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I can get that line also by using the designer in asp.net, but then I don't know how to refer to the object. The obvious would be to use object id, but that doesn't work from a code behind page. My question is if I must use a script that runs on the client. In that case I would need to learn how to do client scripts. Right now my only exposure to the web world has being using code behind pages in asp.net.

  #4 (permalink)  
Old December 8th, 2003, 03:55 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , .
Posts: 540
Thanks: 0
Thanked 4 Times in 4 Posts
Default

I am not sure about within .Net, but you can access the properties of an ActiveX control using a client-side script.

J
  #5 (permalink)  
Old April 18th, 2005, 06:28 AM
Registered User
 
Join Date: Apr 2005
Location: sdk, punjab, Pakistan.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to ranaaamir80 Send a message via AIM to ranaaamir80 Send a message via MSN to ranaaamir80 Send a message via Yahoo to ranaaamir80
Default

hello, can any body help me,i have a problem of using COM components in asp.net ? plz send me the complete procedure so that i can use COM components in asp.net page.

          plz send me complete detail.

amir
  #6 (permalink)  
Old April 18th, 2005, 08:32 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

amir,

Is this a new question involving COM components in ASP.NET (vs. in the client)?

Can you provide some details about how you are working with the application? Are you using VS.NET?

-Peter
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot create ActiveX component in asp.net 2.0 Thorgal ASP.NET 2.0 Professional 1 December 14th, 2007 12:17 AM
asp.net with crystal activex viewer NagarajuK Crystal Reports 0 November 22nd, 2007 10:17 AM
"activex invalid" in asp.net songyonggang ASP.NET 2.0 Basics 0 June 9th, 2006 10:32 PM



All times are GMT -4. The time now is 09:48 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.