Short Version of Question:
Can anyone provide an example of how I should embed the ActiveX and license,
and then use it in a function?
LongerVersion:
I am attempting to convert an asp file to a asp.net file using C#.
The original file has an ActiveX control which is contained in a cab file.
The cab file contains the .ocx file which connects to a socket and transfers
client info to a server, as well as several .dlls
The cab file also references another cab file which contains files to
install on the client machine in case they do not have VBRuntime6 installed
on their machine.
We have obtained a Microsoft license for the ActiveX control.
My problem is, how to call or reference the control in my .net page. I have
researched and am doing what I have seen, but am getting errors.
The original code has the ActiveX embedded in the html like so:
<form runat="server" name="trade_ent ry_verify" method="post">
..
..
..
<P>
<OBJECT CLASSID="clsid: blah_blah_blah"
id="Microsoft_L icensed_Class_M anager_1_0"1 VIEWASTEXT>
<PARAM NAME="LPKPath" VALUE="NAME.lpk ">
</OBJECT>
<OBJECT id=IDNAME2 height=0 width=0
classid=clsid:b lah_blah_blah codeBase="CABNA ME.CAB#version= 1,0,0,0"
VIEWASTEXT>
<PARAM NAME="_ExtentX" VALUE="873">
<PARAM NAME="_ExtentY" VALUE="847">
</OBJECT>
</P>
..
..
..
</form>
One of the functions is like so (note- : trade_entry_ver ify is the form
name):
<script language="vbscr ipt">
..
..
..
function doSubmit()
trade_entry_ver ify.IDNAME2.Clo seSocket
trade_entry_ver ify.IDNAME2.Hos tAddress = "ip.address.0.0 "
trade_entry_ver ify.IDNAME2.Por t = "portnum"
Result = trade_entry_ver ify.citcp2.Conn ectToHost
end function
..
..
..
</script>
In my C# code, I have embedded the two objects in the html as shown above
since the examples I have found seem to do the same.
Yet, when I try to preview the page in IE, I get the following error:
Compiler Error Message: BC30451: Name 'trade_entry_ve rify' is not declared.
Source Error:
Line 85:
Line 86: function doSubmit()
Line 87: trade_entry_ver ify.CITCP2.Clos eSocket
Line 88: trade_entry_ver ify.CITCP2.Host Address = "ipaddressI use"
Line 89: trade_entry_ver ify.CITCP2.Port = "2000"
trade_entry_ver ify is simply the form name, so I tried removing it and then
I get:
Compiler Error Message: BC30451: Name 'CITCP2' is not declared.
Source Error:
Line 85:
Line 86: function doSubmit()
Line 87: CITCP2.CloseSoc ket
Line 88: CITCP2.HostAddr ess = "ipaddressI use"
Line 89: CITCP2.Port = "2000"
for this page, to get started and for testing purposes, I simply cut and
pasted the VBScript function within the script tags. Ultimately, I wish to
rewrite it as C#.
Can anyone provide an example of how I should embed the ActiveX and license,
and then use it in a function? Any help would be really, really appreciated. 0 1323 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Javier Bertran |
last post by:
Hi all,
I have an ActiveX control developed in Visual C++ 6.0 that I want to use in
a C# project. I want the ActiveX code to run on a separate thread, but can't
seem to get it to work. If for example my ActiveX member has an infinite
loop, the .NET app gives all processing to the ActiveX and never returns,
not even to redraw the window. Here is what I tried (in a nutshell):
VC++ 6.0 OCX code:
void CMyAXControlCtrl::Loop()
|
by: Michiel |
last post by:
Hello,
I have an ActiveX control which I can call fine from HTML pages, using the
object tag like <OBJECT ID="UserControl1" WIDTH="0" HEIGHT="0"
CLASSID="CLSID:85A5119D-0000-0000-0000-5467CB71943E" CODEBASE =
http://mywebsite/MyActiveX.ocx#Version=1,1,0,0 VIEWASTEXT></OBJECT>
, and then simply adding them to the object's id with a . like
UserControl1.MyFunction()
|
by: fumihiko |
last post by:
Hi,
I created an activex control (C++), and it uses another COM dll (C++).
This COM dll links with a static library that dose some calculation.
(both are debug multithreaded dll)
I created a C# client having activex control embedded at the very
beginning (added in the design window); then, I created another same
activex control at the runtime. After the 2nd activex control is
created, I start to get errors on the function calls to the...
|
by: Shawn |
last post by:
Hi.
I've never created an ActiveX control before, so I know little about what it
is capable of and what its limitations are. My problem is this: I have to
create a way to send multiple documents from the web server to a printer on
the user's network. The way it works today the user has to manually
download each document and send it to his printer, but now they want me to
create an automated process.
Will I be able to download documents...
|
by: fniles |
last post by:
I have an ActiveX control in my web page that I tried to access using
intranet.
I have implemented IObjectSafety in the ActiveX control, and when I created
the CAB file using VB Pakage and Deployment Wizard, under "Safety Settings"
I selected "Yes" for "Safe for Scripting" and "Yes" for "Safe for
Initialization". I also have signed the CAB file.
In IE, the option 'Script ActiveX controls marked Safe for Scripting' is
already set to...
| |
by: Frank |
last post by:
Short Version of Question:
Can anyone provide an example of how I should embed the ActiveX and license,
and then use it in a function?
|
by: Frank |
last post by:
Any suggestions on how I should handle this?
I was asked to convert a small web application that was written in classic
ASP into ASP.NET.
The original site uses some VBScript to interface with an ActiveX control,
which is contained in a CAB file.
Somehow, I have managed to use the original VBScript in a respective .NET
page, but there are several problems.
|
by: Budhi Saputra Prasetya |
last post by:
Hi All,
I'm trying to display .NET Custom Control (created using Inherited Control)
on an ASPX page, but no luck. I already registered the Control to Global
Assembly Cache through .NET Framework 1.1 Configuration. I have also put a
reference to the control on my ASP .NET project. The view that I get is only
a disabled text area.
Below is the code that I'm using:
|
by: Jialiang Ge [MSFT] |
last post by:
Hello Philippe,
In addition to bruce's points, I'd suggest the KB article
http://support.microsoft.com/kb/317392. It demonstrates how to host an
ActiveX control in ASP.NET (for your first question), and points out that
ActiveX control is a pure client-side control, the server-side code cannot
access this control (for your second question). Server-side code can access
only server controls, which are the controls that are listed on the Web...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |