...

View Full Version : replacing double quotation ... how?



pinscher
12-30-2004, 12:39 PM
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....

Brandoe85
12-30-2004, 12:56 PM
strSomthing = replace(strSomthing, chr(34), "'")

pinscher
12-30-2004, 01:05 PM
Argh... but of course .. :eek: how embarassing ..

Brandoe85
12-30-2004, 01:07 PM
It's all good, it happends to us all :thumbsup:

MetalStorm
12-31-2004, 05:28 PM
you can also use "" as a "

for example:

replace(whatever, """", "'")

handy if you want to write out double quotes within a string:

Response.write "My name is ""stu""" - would output:

I am "stu"

just another alternative :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum