Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 5th, 2006, 06:33 AM
Registered User
 
Join Date: Jan 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to access ocx properties in asp.net

Hi Guys,

In my ASP.net application, I want to comunicate with DLL installed on client
machine and for that, I developed an ActiveX control in vb and incorporated
in my aspx page using Object tag.
this ActiveX control c
I am trying to access its properties by clicking on the button. I am doing
this in jscript function and calling the function on OnClick event of button,
but I am not getting any result nor I am getting any error

The object tag that I have defined is

    <OBJECT id="ucHWKey" style="Z-INDEX: 111; LEFT: 672px; POSITION: absolute;
TOP: 88px" classid="clsid:781D9F61-F7FA-49F6-BABC-6989022730BA"
                name="ctrHWKey" VIEWASTEXT>
        <PARAM NAME="_ExtentX" VALUE="8308">
        <PARAM NAME="_ExtentY" VALUE="688">
        <PARAM NAME="BackColor" VALUE="-2147483633">
        <PARAM NAME="ForeColor" VALUE="-2147483640">
        <PARAM NAME="Enabled" VALUE="-1">
        <PARAM NAME="BackStyle" VALUE="1">
        <PARAM NAME="BorderStyle" VALUE="0">
    </OBJECT>

whereas the script function I wrote is,

    function CheckValidKey()
    {
         if (document.getElementById)
         {
        var oHK = document.getElementById("ucHWKey");
        window.alert ("Checking Property");
        if (oHK.IsValidKey)
            window.alert ("Valid Key");
        else
            window.alert ("Invalid Key");
         }
    }

When I click on the button I get "Checking Property" alert, but not getting
any of the later alerts.

Am I doing anything wrong?
Please guide me how do I access properties of vb ActiveX control in my aspx page

Thanks

Jeetendra
 
Old April 17th, 2006, 12:56 AM
Registered User
 
Join Date: Apr 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

I am looking for solution for the same problem. I want to access properties of an OCX control.. OUt of few properties, i am able to use but some of them are not at all accessible in Javascript where as they work perfectly in VB application.. i m kinda totally confused and stucked..

Did u get any work around or solution for this problem?

Ashish






Similar Threads
Thread Thread Starter Forum Replies Last Post
OCX and vb.net shakeeb ASP.NET 1.0 and 1.1 Professional 0 October 31st, 2007 10:02 AM
How to use vb6.0 ocx or dll in asp.net 1.1 Pramods ASP.NET 1.0 and 1.1 Basics 1 June 22nd, 2007 06:32 AM
How to use ImgEdit.ocx in ASP? RevatiWani Classic ASP Components 0 March 9th, 2005 12:26 AM
how to Use an Ocx Control in Asp.Net Sureshsnair General .NET 1 January 7th, 2005 03:08 AM
SQL Access/ASP.NET data access issue saeta57 SQL Server ASP 1 July 4th, 2004 04:29 PM





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