Many people get choked up when trying code similar to the following:
<% Response.Write "<table width=100%>" %> |
This will result in the following error:
Microsoft VBScript compilation (0x800A0409) Unterminated string constant |
This is because the ASP engine tries to parse all the <%%> blocks first, and ...width=100%> looks like the end of an ASP block (which of course isn't the case). There are several ways to work around this; for example, you can use valid HTML by enclosing the width attribute's value in quotes, you can leave a space after the percent sign, you can organize your element tag in a different order, or you can escape the sequence using a backslash.
To wit:
<% response.write "<table border=0 width='100%'>" response.write "<table border=0 width=""100%"">" response.write "<table border=0 width=" & chr(34) & "100%" & chr(34) & ">" response.write "<table border=0 width=100% >" response.write "<table border=0 width=100%\>" response.write "<table width=100% border=0>" %> |
For simplicity's sake, I prefer the first method - partly because it's much easier to read, and partly because any HTML attribute that isn't a number should be enclosed in quotes of some kind.
This is a trivial example, of course; but the same principals apply when creating an ASP file using FileSystemObject.