Solved

Embeding a User Control in a web page

Posted on 2002-06-04
5
378 Views
Last Modified: 2011-09-20
I know that I can create and compile an OCX and use the <object> tag in a web page to embed the control.  But the thing that I don't get is this: the only parameter in the <object> tag is "classid" why can't I just use: <object src="myobject.ocx"></object>? I want to be able to create a bunch of controls, upload them to a web server, and have a web page display the controls! Please let me know how I can do this.
Thanks,
Josh
0
Comment
Question by:jsm11482
  • 2
  • 2
5 Comments
 
LVL 17

Expert Comment

by:inthedark
ID: 7055555
The only snag with this approach is that your page can only be used by Microsoft clients. Are you sure you want to go that way?
0
 
LVL 39

Accepted Solution

by:
appari earned 80 total points
ID: 7055611
for this purpose you need to do the following things.

1. build your activex control and create cab file for deploying on net.

2. using lpktool coming in visual studio cd, create a licence file dont forget to include all the third party controls while creating license file.

3. in html add code like this


<OBJECT
 CLASSID="CLSID:5220cb21-c88d-11cf-b347-00aa00a28331" >
    <PARAM NAME="LPKPath" VALUE="yourlicencefilename.lpk">
</OBJECT>


<OBJECT ID="FEN0100"
CLASSID="CLSID:E92B40E8-786A-11D6-9AB3-00A0B00D4CE1"
CODEBASE="yourcontrol.CAB#version=1,0,0,2">
</OBJECT>

for more information on lpktoll

http://msdn.microsoft.com/downloads/samples/internet/default.asp?url=/downloads/samples/Internet/browsertools/lpktool/default.asp

http://msdn.microsoft.com/library/default.asp?url=/workshop/components/activex/licensing.asp#LPK_TOOL

http://support.microsoft.com/directory/article.asp?ID=KB;EN-US;Q159923&

hope this helps u

0
 
LVL 39

Expert Comment

by:appari
ID: 7055613
2. using lpktool coming in visual studio cd, create a licence file dont forget to include all the third
party controls while creating license file.

this should be

2. using lpktool coming in visual studio cd, create a licence file dont forget to include all the third
party controls used in making the user control, while creating license file.

0
 

Author Comment

by:jsm11482
ID: 7056521
I'll try all those things later today, but how do I get the clsid from my OCX's? i.e. I build an OCX and want to insert but I do not know where to find that OCX's classid! Where is it?
-Josh
0
 

Author Comment

by:jsm11482
ID: 7056566
appari - I tried your suggestions, they work great!
Thanks,
Josh

p.s.: will this only work on IE on a PC or will it also work in Netscape on a PC? The user MUST be on a PC to be able to use these controls right?
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now