Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


Embeding a User Control in a web page

Posted on 2002-06-04
Medium Priority
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.
Question by:jsm11482
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
LVL 17

Expert Comment

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?
LVL 39

Accepted Solution

appari earned 320 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

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


for more information on lpktoll




hope this helps u

LVL 39

Expert Comment

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.


Author Comment

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?

Author Comment

ID: 7056566
appari - I tried your suggestions, they work great!

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?

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

636 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