Double quotes in write to txt file?

Results 1 to 3 of 3

Thread: Double quotes in write to txt file?

  1. #1
    Join Date
    Dec 1969

    Default Double quotes in write to txt file?

    Hi,<BR><BR>I&#039;m writing to a text file from a form via asp. The text file is a simple comma delim data source for a generator template. I know if I want to use commas at any time in the delim file without quoting (e.g. QUESTION, "blah, blah" as opposed to QUESTION, blah, blah) it&#039;ll kick it out, so my question is thus: how can I write from ASP to the text file including double quotes? If in my code I include "" around a request from the form i&#039;m updating from, it kicks it out as an error; if i leave my quotes out I can&#039;t use commas in the file....any ideas? I&#039;ve looked into using an ASCII code, but there is none (that I kno) for the double quotes....

  2. #2
    Join Date
    Dec 1969

    Default Response.write Chr(34)

    Ensure you remove any in the data by:<BR>Str = Replace(Str,Chr(34),"&#039;")<BR><BR>Response.writ e Chr(34) & Str & Chr(34)<BR>

  3. #3
    Join Date
    Dec 1969

    Default RE: Response.write Chr(34)

    Did you try this? I did and it did not work.<BR>please let me know if you find out.<BR>thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts