Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Dec 2004
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    replacing double quotation ... how?

    Doing replace(request.form("name"), "'", "'") is a nice way to get around the single quotation problem but how to do the same with double quotation.
    replace(request.form("name"), """, """) wont work, nor will replace(request.form("name"), '"', """) as the ' makes what follows a comment in asp. Any ideas....

  • #2
    teh Moderatorinator
    Join Date
    Sep 2004
    Location
    USA
    Posts
    2,472
    Thanks
    4
    Thanked 40 Times in 40 Posts
    strSomthing = replace(strSomthing, chr(34), "'")

  • #3
    New Coder
    Join Date
    Dec 2004
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Argh... but of course .. how embarassing ..

  • #4
    teh Moderatorinator
    Join Date
    Sep 2004
    Location
    USA
    Posts
    2,472
    Thanks
    4
    Thanked 40 Times in 40 Posts
    It's all good, it happends to us all

  • #5
    New Coder
    Join Date
    Jul 2002
    Location
    UK
    Posts
    92
    Thanks
    0
    Thanked 0 Times in 0 Posts
    you can also use "" as a "

    for example:
    Code:
    replace(whatever, """", "'")
    handy if you want to write out double quotes within a string:
    Code:
    Response.write "My name is ""stu"""
    - would output:
    I am "stu"
    just another alternative


  •  

    Posting Permissions

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