Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 28th, 2005, 12:23 AM
Authorized User
 
Join Date: Jan 2005
Location: , , .
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default Print Problem

I just typed in HELLO but it doesn't print .... do i miss something? where? can youi give ne am example? thanks...
-------------------------------------------------------
<%@ Language=VBScript %>

<HTML>
<BODY>
<FORM METHOD=POST ACTION="bingo1.asp" id=form1 name=form1>
<input type=hidden name=item value=<% = Request.form("item") %>>
<INPUT TYPE=text NAME=item><BR>
<INPUT TYPE=SUBMIT VALUE="Click Me">
</BODY>
</HTML>
----------------------------------------------------------

<%@ Language=VBScript %>
<% Option Explicit %>

<HTML>
<BODY>
<%
Dim fso, folder,f,ts

Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFile("w:\boseo\test.txt")
Set ts = f.OpenAsTextStream(1,-2)

do while ts.AtEndOfStream = false
  Response.Write ts.ReadLine & "<BR>"
loop
%>

</BODY>
</HTML>

Reply With Quote
  #2 (permalink)  
Old January 28th, 2005, 01:41 PM
Friend of Wrox
Points: 2,473, Level: 20
Points: 2,473, Level: 20 Points: 2,473, Level: 20 Points: 2,473, Level: 20
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2004
Location: India
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts
Default

Following input types are with same name:

<input type=hidden name=item value=<% = Request.form("item") %>>
<INPUT TYPE=text NAME=item><BR>

what is the requirement?
do you wan to print content or read text file?


Om Prakash
Reply With Quote
  #3 (permalink)  
Old January 28th, 2005, 02:14 PM
Authorized User
 
Join Date: Jan 2005
Location: , , .
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes, I want to print contents... and also I want to write it to this file... for example, if i typed in HELLO that will print vertically or horizonally on the page and also write out to test.txt. when i opended test.txt and there is no HELLO in this file... i don't know how to.... thanks a lot for your help... i still need help.. thans tanks thanks.

Reply With Quote
  #4 (permalink)  
Old January 28th, 2005, 02:43 PM
Friend of Wrox
Points: 2,473, Level: 20
Points: 2,473, Level: 20 Points: 2,473, Level: 20 Points: 2,473, Level: 20
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2004
Location: India
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts
Default

following is the code to create & write contents in text file:

    Set fso = CreateObject("Scripting.FileSystemObject")
    Set a = fso.CreateTextFile("c:\testfile.txt", True)
    a.WriteLine("This is a test.")
    a.Close
    set a = nothing
    set fso = nothing

For printing, please check the following link:

http://www.taltech.com/TALtech_web/s..._Printing.html



Om Prakash
Reply With Quote
  #5 (permalink)  
Old January 28th, 2005, 08:05 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Copenhagen N, , Denmark.
Posts: 217
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to mega
Default

use

• VbCrLf for Carrie return Linefeeds

• VbLf for Linefeeds

• VbCr for Carrie return

and of course <br /> in your page (it's absolutely legal to write both VbCrLf and <br> in HTML).

om_prakash got the answer regarding writing to a file

 - mega
Moving to C# .NET
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Textbox problem print preview vs. print jenisageek Access 5 May 2nd, 2008 12:54 PM
Print problem in chapter 7 kathy Thisted BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 5 April 17th, 2008 06:57 AM
print problem annie_stwg ASP.NET 2.0 Basics 0 September 18th, 2006 12:19 AM
print problem madhukp Classic ASP Basics 2 August 20th, 2004 11:39 PM



All times are GMT -4. The time now is 01:21 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.