Dim MyConn
MyConn = Server.CreateObject("Name.Class")
MyConn = Server.CreateObject("Name.Class")
解决方案 »
- 像U酷视频播放完后 有相关视频的超链接 是如何做的
- 正则
- botton的command事件中怎么获得textbox的值
- 【高分】.net发布网站的问题
- 很简单的问题,是ID检测问题,我在线,很快结帖
- 在winform编程中,有类似于WEB窗体中upfile上传的控件吗?就是一个文本框加一个按钮的
- 大家好,请教一个算法问题,谢谢参与!
- 请问在做报表生成rpt 文件时, 可不可以自己指定一个连接数据库的字符串的?
- 关于duwamish的安装,请各位大虾执教!!!
- asp.net <input type="hidden" name="__LASTFOCUS" id="__LASTFOCUS" value="" />
- 怎样从SQL2000的一个IMAGE属性的字段读出图片显示在WEBFORM下?
- ASP.NET怎么发布程序?我写的东西移动到另一个目录就有问题了
在VBScript中调用的。HTML文件用。
不能用Server.CreateObject().
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>WebForm1</title>
<script language="vbscript">
Option Explicit dim isAdd Sub MyClick()
'------
Dim oo
const iRowHead=3 '2
Set oo= CreateObject("DLLPrint.HTMPrint") oo.Rows =200
oo.Cols =20
Dim sData(200 ,20)
dim i
dim j
oo.FixedRows =iRowHead
for i=0 to iRowHead -1
for j=0 to oo.Cols -1
sData(i,j)="列头" & cstr(i) & "," & cstr(j) & ""
next
next
'For i=0 To oo.Rows-oo.FixedRows-1
For i=0 To oo.Rows-iRowHead-1 '在循环中尽量不用oo.FixedRows,用具体的数iRowHead,以免影响速度
For j=0 To oo.Cols -1
sData(i+iRowHead,j) = "打印(" & cstr(i) & "," & cstr(j) & ")" '不用 sData(i+oo.FixedRows,j)=...
Next
Next
sData(8,8)="打印之前10打印之前10打印之前10打印之前10打印之前10":sData(18,18)="打印之打印之前10打印之前10前11"
oo.leftmargin =1000
if isAdd=0 then
oo.AddTitle "表头"
isAdd=1
end if
if oo.GetPrintData(sData) then
oo.Preview
end if
erase sData
Set oo=nothing
exit sub
'------
End Sub
-->
</script>
<meta content="Microsoft Visual Studio.NET 7.0" name="GENERATOR">
<meta content="Visual Basic 7.0" name="CODE_LANGUAGE">
<meta content="VBScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" action="testPrintView.asp" method="post">
<INPUT style="Z-INDEX: 104; LEFT: 178px; WIDTH: 165px; POSITION: absolute; TOP: 170px; HEIGHT: 28px" onclick="MyClick()" type="button" value="Button"></form>
</body>
</HTML>
2. make sure all the settings related to ActiveX are ENABLED
<HEAD>
<META name=VI60_defaultClientScript content=VBScript>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE>打印预览控件</TITLE>
<SCRIPT ID=clientEventHandlersVBS LANGUAGE=vbscript>
<!--
Option Explicitdim isAdd
Sub Command1_onClick()
'------
Dim oo
const iRowHead=3 '2
Set oo= CreateObject("DLLPrint.HTMPrint")
oo.Rows =200
oo.Cols =20
Dim sData(200 ,20)
'sData(0,0)="打印之前00":sData(0,1)="打印之前01"
'sData(1,0)="打印之前10":sData(1,1)="打印之前11"
dim i
dim j
oo.FixedRows =iRowHead
for i=0 to iRowHead -1
for j=0 to oo.Cols -1
sData(i,j)="列头" & cstr(i) & "," & cstr(j) & ""
next
next
'For i=0 To oo.Rows-oo.FixedRows-1
For i=0 To oo.Rows-iRowHead-1 '在循环中尽量不用oo.FixedRows,用具体的数iRowHead,以免影响速度
For j=0 To oo.Cols -1
sData(i+iRowHead,j) = "打印(" & cstr(i) & "," & cstr(j) & ")" '不用 sData(i+oo.FixedRows,j)=...
Next
Next
sData(8,8)="打印之前10打印之前10打印之前10打印之前10打印之前10":sData(18,18)="打印之打印之前10打印之前10前11"
sData(4,4)=""
oo.leftmargin =1000
if isAdd=0 then
oo.AddTitle "表头"
isAdd=1
end if
if oo.GetPrintData(sData) then
oo.Preview
end if
erase sData
Set oo=nothing
exit sub
'------
End Sub-->
</SCRIPT>
</HEAD>
<BODY>
<INPUT id=command1 type=button value=打印测试>
<div style="DISPLAY: none">
</div>
</BODY>
</HTML>