Network printing function with ASP

zhaozj2021-02-12  150

<% @ Language = VBScript%>

<%

Option expedition

DIM strsubmit "Form to save the submit button"

DIM STRPRINTERPATH "Save the value of the network printer path"

DIM STRUSERNAME "The value of the username in Form

DIM strpassword "Form in password value

DIM STRMESSAGE "FORM print content"

DIM OBJFS "file system object in VBScript

Dim objWshnet "Network objects in WSH

DIM Objprinter "Print Object"

STRSUBMIT = Request.form ("Submit")

%>

<%

If strsubmit = "" ""

%>

Please be aware of:

Since this is a demonstration, where the NT account and password are used in ASP.

The login process should be safely processed in the real application.

Network Printer Path:

Value = "// / >

Login account:

Value = "<% = strusername%>>

login password:

Name = password>

Please enter the text you want to print: