473,383 Members | 1,846 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Cannot get ASP.NET page to work with ActiveX control

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 given me an
ActiveX control to do it.

This is the code (well, the pertinent bits anyway)

PLEASE NOTE: THE LINES MARKED WITH *** ARE NEW AS A RESULT OF THIS
NEW REQUIREMENT

<%@ Register TagPrefix="iewc" Namespace="Microsoft.Web.UI.WebControls"
Assembly="Microsoft.Web.UI.WebControls, Version=1.0.2.116,
Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="Item_Leads.aspx.vb" Inherits="CCC_Sales_Lead.LeadItem" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>Colt Car Company Sales Lead System</title>
<meta content="Microsoft Visual Studio.NET 7.0"
name="GENERATOR">
<meta content="Visual Basic 7.0" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5"
name="vs_targetSchema">
<LINK href="../Styles.css" type="text/css" rel="stylesheet">
<SCRIPT language="javascript"
src="../jscript/formgeneric.js"></SCRIPT>
</HEAD>
<body leftMargin="4" topMargin="4" rightMargin="4"
MS_POSITIONING="GridLayout">
*** <OBJECT ID=Exporter
CLASSID=CLSID:35FC60AA-B509-11D2-80AE-00A0245361B3
CODEBASE=HTMLExport.CAB#version=1,0,0,7 VIEWASTEXT> </OBJECT>
<form id="Form1" method="post" runat="server">


<INPUT id="txtMergeFile" style="Z-INDEX: 101; LEFT: 71px; WIDTH: 30px;
POSITION: absolute; TOP: 583px; HEIGHT: 10px" type="hidden" size="1"
runat="server">


***<INPUT id="cmdWord" style="Z-INDEX: 106; LEFT: 209px; WIDTH: 75px;
POSITION: absolute; TOP: 12px; HEIGHT: 21px" type="button"
value="Button" onclick="ExportTable()">


function DoQueryClick()
{
var columnindex, gridrowindex, gridname
if (!(oRow = GetRow(window.event.srcElement))) return true;
columnindex = window.event.srcElement.cellIndex;
gridrowindex = oRow.rowIndex + 2
gridname = oRow.parentElement.parentElement.id;
//stop

if (columnindex == DeleteColumn ||
window.event.srcElement.parentElement.parentElemen t.cellIndex ==
DeleteColumn)
{
// Verify - Force delete postback - assumes ctl4 is delete
column
if (window.confirm('Delete response dated: ' +
oRow.cells(2).innerText + ' ?'))
{
__doPostBack(gridname + ':_ctl' + gridrowindex +
':_ctl2','');
}
}
else
{

// Assumes rowindex begins at 3 - select/delete columns return
undefined if image clicked on
if ((gridrowindex > 2))
{
// Force select postback - assumes ctl1 is select column
__doPostBack(gridname + ':_ctl' + gridrowindex +
':_ctl0','');
}
} //THIS IS LINE 563
}//-->
***<script language="VBScript">
*** Sub ExportTable()
*** errCode =
Exporter.ExportTable(document.getElementById(txtMe rgeFile).value,"WORD"))
*** End Sub
***</script>


When the page loads I get a Runtime error:

Error: Line 563 Expected end of statement

If I ignore this the page renders fine, but when I click the cmdWord
button I get another error :

Microsoft JScript runtime error: Object expected

and the function call ExportTable() is highlighted.

Anyone any ideas? Much, much appreciated.

Edward
Nov 17 '05 #1
0 2420

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

Similar topics

2
by: Mike R | last post by:
We have an ASP page that generates a report. We have included a button on the page that allows the user to save the report as a .csv file. The button makes use of the Microsoft Common Dialog...
2
by: Shahzad Godil | last post by:
I have successfully placed a seperate .Net windows control on my aspx page as well as one ActiveX Control (Visio control) on my aspx. But my orignal design is that Visio activex will be placed in...
6
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...
0
by: Lee | last post by:
I have an activex control built with VS 2005, C#. I have a "Done" event that I fire from the control when some processing is done. I have tested this with a C++ app as the host, and I do get the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.