Aug 22, 2003 #1 dcarbone Programmer Aug 22, 2003 29 CA how do i use a response.write to write the value of a variable to a file x="hello" oTextFile.Write response.write(x) this code just writes it to the screen and not to the file
how do i use a response.write to write the value of a variable to a file x="hello" oTextFile.Write response.write(x) this code just writes it to the screen and not to the file
Aug 22, 2003 #2 Veep Programmer Jan 10, 2002 1,368 US You need to use the FSO to either create the file or open the file for writing. http://www.sloppycode.net/fso/ Upvote 0 Downvote
You need to use the FSO to either create the file or open the file for writing. http://www.sloppycode.net/fso/
Aug 22, 2003 Thread starter #3 dcarbone Programmer Aug 22, 2003 29 CA set Fso = server.createobject("Scripting.FileSystemObject" set oTextFile = FspenTextFile(FileName, iMode, True) x="hello" oTextFile.WriteLine response.write(x).value oTextFile.Write "<td align=center><b><font size=2 face=Arial>" & response.write(x) & "</font></b></td>" oTextFile.Write oTextFile.Close set oTextFile = nothing set FSo = nothing end function x is any value that i want to write to the file. But it still doesnt write. It displays it to the screen Upvote 0 Downvote
set Fso = server.createobject("Scripting.FileSystemObject" set oTextFile = FspenTextFile(FileName, iMode, True) x="hello" oTextFile.WriteLine response.write(x).value oTextFile.Write "<td align=center><b><font size=2 face=Arial>" & response.write(x) & "</font></b></td>" oTextFile.Write oTextFile.Close set oTextFile = nothing set FSo = nothing end function x is any value that i want to write to the file. But it still doesnt write. It displays it to the screen