I am writing code to add a printing function in my .Net page. The print function is called by a block of VBScript code which is provided by label printer company.
My problem is how to pass Street value to these VBScipt code from my ASP.NET variables. For example, use Session("StreetAddress"
Here is the sample code:
*********************************************************
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="LabelPrint.aspx.vb" Inherits="HelpDesk.WebForm2"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<SCRIPT LANGUAGE="VBScript">
Sub Btn1_onclick()
Dim DymoAddIn, DymoLabel
Set DymoAddIn = CreateObject("DYMO.DymoAddIn"
Set DymoLabel = CreateObject("DYMO.DymoLabels"
DymoAddIn.Open "C:\Program Files\Dymo Label\Label Files\Address (30252, 30320).LWT"
DymoLabel.SetAddress 1,"Session("StreetAddress""+chr(10)+"SAMPLE Corporation"+chr(10)+"333 W. Fantasy World"+chr(10)+"Santaland, NP 99999-9999"
DymoAddIn.Print 1, TRUE
End Sub
</SCRIPT>
<head>
<title>Label Print</title>
<meta name="GENERATOR" content="Microsoft Visual Studio.NET 7.0">
<meta name="CODE_LANGUAGE" content="Visual Basic 7.0">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content=" </head>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<Bold><p></p>Label Printing Demo</Bold></p> <INPUT TYPE="BUTTON" NAME="Btn1" VALUE="Print Label">
</form>
</body>
</html>
*********************************************************
Thanks!
My problem is how to pass Street value to these VBScipt code from my ASP.NET variables. For example, use Session("StreetAddress"
Here is the sample code:
*********************************************************
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="LabelPrint.aspx.vb" Inherits="HelpDesk.WebForm2"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<SCRIPT LANGUAGE="VBScript">
Sub Btn1_onclick()
Dim DymoAddIn, DymoLabel
Set DymoAddIn = CreateObject("DYMO.DymoAddIn"
Set DymoLabel = CreateObject("DYMO.DymoLabels"
DymoAddIn.Open "C:\Program Files\Dymo Label\Label Files\Address (30252, 30320).LWT"
DymoLabel.SetAddress 1,"Session("StreetAddress""+chr(10)+"SAMPLE Corporation"+chr(10)+"333 W. Fantasy World"+chr(10)+"Santaland, NP 99999-9999"
DymoAddIn.Print 1, TRUE
End Sub
</SCRIPT>
<head>
<title>Label Print</title>
<meta name="GENERATOR" content="Microsoft Visual Studio.NET 7.0">
<meta name="CODE_LANGUAGE" content="Visual Basic 7.0">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content=" </head>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<Bold><p></p>Label Printing Demo</Bold></p> <INPUT TYPE="BUTTON" NAME="Btn1" VALUE="Print Label">
</form>
</body>
</html>
*********************************************************
Thanks!