473,473 Members | 2,026 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

ActiveX control on ASP.NET Web Form Runtime Error

ann
Hi,

I am trying to add an ActiveX control on my ASP.NET web
form (the language for code behind is C#). I have some
client-side vbscript to handle events from the html input
buttons. In the client-side script, I am calling the
ActiveX control object to perform some job. The problem
is: when I run the application and click on the button
(which fires the event), I get a runtime error: Microsoft
VBScript runtime error: Object required: 'xx', where
the 'xx' is the ActiveX object name.

Following is a sample html from my app:

<HTML>
<HEAD>
<title>WebForm1</title>
<meta name="GENERATOR" Content="Microsoft Visual
Studio 7.0">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name=vs_defaultClientScript content="VBScript">
<meta name=vs_targetSchema
content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>

<body MS_POSITIONING="GridLayout">
<form name="Form1" method="post"
action="WebForm1.aspx" id="Form1">

<OBJECT id=objPrint
style="Z-INDEX: 107; LEFT: 406px; POSITION: absolute; TOP:
208px"
codeBase=PrntPRO2.cab classid=clsid:9841D1AE-9C0B-11D3-
9452-00105A098C21
name=objPrint VIEWASTEXT>
<PARAM NAME="_cx" VALUE="953">
<PARAM NAME="_cy" VALUE="794">
<PARAM NAME="AddCR" VALUE="-1">
<PARAM NAME="Alignment" VALUE="0">
<PARAM NAME="BackColor" VALUE="16777215">
<PARAM NAME="BackStyle" VALUE="0">
<PARAM NAME="BMargin" VALUE="360">
<PARAM NAME="CurrentX" VALUE="360">
<PARAM NAME="CurrentY" VALUE="360">
<PARAM NAME="DrawMode" VALUE="13">
<PARAM NAME="DrawStyle" VALUE="1">
<PARAM NAME="DrawWidth" VALUE="1">
<PARAM NAME="FillColor" VALUE="0">
<PARAM NAME="FillStyle" VALUE="1">
<PARAM NAME="ForeColor" VALUE="0">
<PARAM NAME="LMargin" VALUE="360">
<PARAM NAME="ScaleMode" VALUE="1">
<PARAM NAME="TMargin" VALUE="360">
<PARAM NAME="WordWrap" VALUE="-1">
<PARAM NAME="Font" VALUE="MS Sans Serif">
<PARAM NAME="AutoMargin" VALUE="-1">
<PARAM NAME="OutputFileName" VALUE="">
<PARAM NAME="PicTransparent" VALUE="0">
<PARAM NAME="PicTransparentColor" VALUE="0">
<PARAM NAME="UseDefaultPrinter" VALUE="-1">
<PARAM NAME="PrintPreviewScale" VALUE="2">
<PARAM NAME="PrintPreviewOnly" VALUE="0">
<PARAM NAME="OwnDIB" VALUE="0">
</OBJECT>
<INPUT id="btnPrint" style="Z-INDEX: 108; LEFT:
469px; WIDTH: 92px; POSITION: absolute; TOP: 34px; HEIGHT:
24px" type="button" value="Print Image" name=btnPrint>

<script id="clientEventHandlersVBS" language="vbscript">
<!--
Sub btnPrint_onclick
'Print a banner at the top of the page, white on black.
objPrint.PrintDialog
End Sub

-->
</script>
</form>

</body>
</HTML>
The program is stopped on the line: objPrint.PrintDialog,
and I keep on getting the objPrint required runtime error.

This ActiveX control and code works fine under a normal
html page. Just not working when I port that to ASP.NET
web form.

Is there anything I need to do in Visual Studio.NET, or in
the ASP.NET web app project setting? Or is it that I need
to have some code somewhere to make ASP.NET realize
there's this ActiveX object?

Thanks in advance for the help!

Ann

Nov 17 '05 #1
0 4393

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: don | last post by:
hello all, msdn says this about using a dotnet windows control library in activex environment... You have to write one relatively small piece of code to make your .NET control accessible to...
3
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...
0
by: Edward | last post by:
I am completely in the dark about ActiveX, but I up until yesterday I used to have a working app with ASP.NET. Now the client wants to fire up a Word document from inside the browser and have...
2
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...
3
by: Evan Delodder | last post by:
I am trying to edit form elements (labels, text box's, etc) in Visual Studio.NET using VB.NET. Whenever I edit certain forms’ appearance whether it is through the code, or through the designer, I...
0
by: roni | last post by:
hi. i have a ActiveX control (with gui, that you need to place on form). i want to set a parameter when my application is start ,and according to that parameter i will load / not load the...
4
by: Wilfried Mestdagh | last post by:
Hi, I have a C# application (VS2005) with Microsoft Mappoint activeX control on a form. At a certain moment I want to create a second one temporary in code. This seems not to work, when I try to...
1
by: Melisa | last post by:
Hi I have a list of all activeX controls registered on my system. When i add one of these activeX controls to Windows Form on runtime , an exception is thrown if this activeX control is not...
0
by: porksmash | last post by:
I'm developing an app here that uses ActiveX controls to connect to industrial cameras over Ethernet. I want to be able to dynamically create those controls at runtime based on how many cameras are...
0
Oralloy
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,...
1
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
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,...
1
isladogs
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
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...
0
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 ...
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.