Web Hosting Talk







View Full Version : ASP Question


fatbargains
08-21-2002, 02:21 PM
How do i write a new line (break) to a file?

wfile.Write (.... ?)

MikeM
08-22-2002, 08:10 AM
For html display: Response.Write ("<br>")

or use an _ (underscore) to state command continues on next line ( I think )

or you can use: & vbCrLf & _

fatbargains
08-22-2002, 11:55 AM
NO.. I dont want to write a webpage.. I want to write to a FILE on a server. PLEASE HELP!

RackMy.com
08-22-2002, 12:03 PM
response.write vbCrLf

MikeM
08-22-2002, 12:24 PM
' write the info to the file

file.write(strName) & vbcrlf

file.write(strHomePage) & vbcrlf

file.write(strEmail) & vbcrlf


http://wdvl.internet.com/Authoring/ASP/FSO/writing_files.html

combs
08-22-2002, 12:38 PM
Write VBCRLF where your require line break/

archie2
08-22-2002, 01:12 PM
e.g. file.write("line 1" & VBCRLF & "line 2")

Try this out!!! It will surely work.

Stew
08-22-2002, 07:46 PM
set fileobject=server.CreateObject("Scripting.filesystemobject")
set MyFile=fileobject.createtextfile("filenamegoeshere")
MyFile.Writeline("Hello" & vbcrlf)
MyFile.Close
set fileobject=nothing

That should be a fairly clear example