469,357 Members | 1,827 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,357 developers. It's quick & easy.

FSO(creating .asp text file)

Expand|Select|Wrap|Line Numbers
  1. set fsoslide=server.CreateObject("Scripting.FileSystemObject")    
  2.     set fslide=fsoslide.CreateTextFile(tPath & "\" & "slidecount.asp", true)
  3.         fslide.WriteLine("<%")
  4.         fslide.WriteLine("lowerslide=1")
  5.         fslide.WriteLine("upperslide="& lslide &"")
  6.         fslide.WriteLine("%>")
  7.     set fslide=nothing
  8. set fsoslide=nothing
I'm trying to create an ASP file here but I can't write the "%>" part of my code. Is this not possible? I always receive an "unterminated string string constant" error. Pls help...
Oct 11 '07 #1
1 1130
jhardman
3,406 Expert 2GB
try:
Expand|Select|Wrap|Line Numbers
  1. set fsoslide=server.CreateObject("Scripting.FileSystemObject")    
  2.     set fslide=fsoslide.CreateTextFile(tPath & "\" & "slidecount.asp", true)
  3.         fslide.WriteLine(chr(60) & chr(37))
  4.         fslide.WriteLine("lowerslide=1")
  5.         fslide.WriteLine("upperslide="& lslide &"")
  6.         fslide.WriteLine(chr(37) & chr(62))
  7.     set fslide=nothing
  8. set fsoslide=nothing
Let me know if this helps.

Jared
Oct 13 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

By using this site, you agree to our Privacy Policy and Terms of Use.