Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Activex controls on ASP page 1

Status
Not open for further replies.

onetomany

Programmer
May 15, 2000
55
US
I need to know how you utilize an acitvex control on an ASP page(the microsoft datetime Picker).I know how to place it on the page and it displays on any computer that has VB 6.0 and Interdev on it. Normal clients will not have this though. I have even used this control in a VB app that ran on a client computer without VB or Interdev installed on it.<br><br>I need to know how to register the component on the client PC the first time the users visits the page. I am developing for a corporate intranet where all users have NT workstation 4.0 and IE 5.0.
 
Dear onetomany,<br><br>I'm not positive of this one but I believe the datetime picker ActiveX controls are installed with IE maybe even as far back as IE 4.<br><br>There are listings at msdn.microsoft.com of the files installed with the versions of IE.<br><br>Hope this helps<br>-pete
 
If you use an &lt;OBJECT&gt; tag with a valid clsid and version, the user will be prompted to download the control if they don't have it, or have an older version. <p>nick bulka<br><a href=mailto: > </a><br><a href= > </a><br>
 
Dear Nick,<br><br>Could you show an example of this with all the details? I mean, a sample of an object tag that would not prompt for the download and then the sample that would prompt.<br><br>Thanks<br>-pete
 
Pete,<br>&nbsp;&nbsp;&nbsp;For security reasons, it's not possible to download without prompting the user, unless they have marked your site as &quot;trusted&quot;.&nbsp;&nbsp;Here's an example of an object tag:<br><br>&lt;OBJECT classid=clsid:0713E8A2-850A-101B-AFC0-4210102A8DA7 id=TreeView1&gt;<br>&lt;PARAM NAME=&quot;_ExtentX&quot; VALUE=&quot;2646&quot;&gt;<br>&lt;PARAM NAME=&quot;_ExtentY&quot; VALUE=&quot;1323&quot;&gt;<br>&lt;PARAM NAME=&quot;_Version&quot; VALUE=&quot;327682&quot;&gt;<br>&lt;PARAM NAME=&quot;HideSelection&quot; VALUE=&quot;1&quot;&gt;<br>&lt;PARAM NAME=&quot;Indentation&quot; VALUE=&quot;1000&quot;&gt;<br>&lt;PARAM NAME=&quot;LabelEdit&quot; VALUE=&quot;0&quot;&gt;<br>&lt;PARAM NAME=&quot;LineStyle&quot; VALUE=&quot;0&quot;&gt;<br>&lt;PARAM NAME=&quot;PathSeparator&quot; VALUE=&quot;&quot;&gt;<br>&lt;PARAM NAME=&quot;Sorted&quot; VALUE=&quot;0&quot;&gt;<br>&lt;PARAM NAME=&quot;Style&quot; VALUE=&quot;7&quot;&gt;<br>&lt;PARAM NAME=&quot;ImageList&quot; VALUE=&quot;&quot;&gt;<br>&lt;PARAM NAME=&quot;BorderStyle&quot; VALUE=&quot;0&quot;&gt;<br>&lt;PARAM NAME=&quot;Appearance&quot; VALUE=&quot;1&quot;&gt;<br>&lt;PARAM NAME=&quot;MousePointer&quot; VALUE=&quot;0&quot;&gt;<br>&lt;PARAM NAME=&quot;Enabled&quot; VALUE=&quot;1&quot;&gt;<br>&lt;PARAM NAME=&quot;OLEDragMode&quot; VALUE=&quot;0&quot;&gt;<br>&lt;PARAM NAME=&quot;OLEDropMode&quot; VALUE=&quot;0&quot;&gt;<br>&lt;/OBJECT&gt; <p>nick bulka<br><a href=mailto: > </a><br><a href= > </a><br>
 
How do you find out what the ClassID of an Object is? <p>Ben Marshalsea<br><a href=mailto: > </a><br><a href= > </a><br>
 
Ben,<br>&nbsp;&nbsp;&nbsp;&nbsp;I use visual interdev, which puts the classid in automatically when I insert an ActiveX object.&nbsp;&nbsp;The classid is stored in the registry.&nbsp;&nbsp;You can also use the progid if you know it. <p>nick bulka<br><a href=mailto: > </a><br><a href= > </a><br>
 
Nick,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;I also use Interdev and the problem I am having is that the client is not bring prompted to download the control.Also the client already has the control loaded on the PC shouldnt the page then be able to use them without having to download?Is there any property I need to set on the control in interdev so that it will prompt for download.<br><br><br><br>
 
In my experience,&nbsp;&nbsp;prompting is the default behavior, unless it's already installed.&nbsp;&nbsp;Has the user previously said they didn't want to download the control?&nbsp;&nbsp;Have you checked the browser settings to make sure the user hasn't specified never to download ActiveX? <p>nick bulka<br><a href=mailto: > </a><br><a href= > </a><br>
 
Nick,<br>&nbsp;&nbsp;&nbsp;&nbsp;The Browser settings are set to allow for downloading ActiveX controls. The control is also already on the PC however when the page is opened the control wont appear just a red X. I have used the contol in a desktop VB app on the same PC and the control works fine.The control will display on the page on any PC that has VB installed on it. <br>Does the OCX file need to be placed in a specific area on the server to enable it to be downloaded? <br><br>
 
Dear Ben,<br><br>You asked:<br><br>&gt;How do you find out what the ClassID of an Object is? <br><br>The Ole View Visual Studio tool helps with this, but they are of course in the registry as Nick points out.<br><br>-pete
 
Dear onetomany,<br><br>If the control is already installed on the PC the browser should not prompt to download it.<br><br>You stated:<br><br>&gt;The control will display on the page on any PC that has VB installed on it. <br><br>This makes me suspicious that the installation of VB has configured the local browser for optimal developer settings while the non-VB machines have different browser configurations. Have you checked the client machine browser settings for running ActiveX controls, trusted sites, security settings etc.? I know some of these settings can affect the display of ActiveX controls in the browser.<br><br>I apologize for not having more specific details.<br><br>Hope this helps<br>-pete
 
To specify the download location for the ActiveX control, add the CODEBASE attribute to your object tag:<br><br>&lt;OBJECT classid=clsid:0713E8A2-850A-101B-AFC0-4210102A8DA7 id=TreeView1 CODEBASE=&quot;<A HREF=" TARGET="_new"> codebase attribute can point to your server, or any other server.&nbsp;&nbsp;And it can point not only to an OCX, but also to a CAB file that contains the OCX, and in that case the server will extract it for you.<br><br> <p>nick bulka<br><a href=mailto: > </a><br><a href= > </a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top