Link to home
Start Free TrialLog in
Avatar of bschwarting
bschwarting

asked on

ASP Syntax

Why can't I get this to work?  Here is the error.

Microsoft VBScript compilation error '800a0401'
Expected end of statement
/updated/insert.asp, line 41
line1 = "<?xml version="1.0" encoding="UTF-8"?>"
------------------------------^
line1 = "<?xml version="1.0" encoding="UTF-8"?>"

f.WriteLine(line1)

Open in new window

Avatar of sammySeltzer
sammySeltzer
Flag of United States of America image

Have no idea what you are trying to do but change to single quoes like:

line1 = "<?xml version='1.0' encoding="UTF-8"?>"

f.WriteLine(line1)
line1 = "<?xml version='1.0' encoding='UTF-8'?>"

I missed the utf-8...
Avatar of bschwarting
bschwarting

ASKER

Inside the quotes needs to stay exactly how it is.  I'm writing a bunch of stuff out to a text file, in a loop, and this has to be the header.
ASKER CERTIFIED SOLUTION
Avatar of sammySeltzer
sammySeltzer
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ah!  you da man!  double quotes worked great!
You can also try this:
Response.Write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");