Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

can i escape? 1

Status
Not open for further replies.

theocraticmind

Programmer
Apr 19, 2002
318
CA
in javascipt, if i have 3 quotes within each other i can do this:

"line one 'inside that line \"inside the second\" ' "

and it would process like i string, within a string, within a string.

i atempted to do this in asp and got an error. is it posible to have 3 strings within each other like this? i realy need to do it.

ps. are " and ' interchangeable in asp?
 
For ASP inside double-quotes you can do a double-double-quote to get 1 double-quote printed. For example:

string = "This is a string with ""a quoted part""."

However, I am not sure if you can to that once you use a single-quote. I guess the big question is why do you need to do that, and is there another way to write the line that you are having to multi-quote?

Maybe by causing the line to span several lines of code you could achieve what you are wanting without all the extra quote marks. Just a suggestion.
Einstein47
(Love is like PI - natural, irrational, endless, and very important.)
 
i may be able to get away with your answer if i do a bit of extra coding. thank you.
 
ok, if my string is this:

&quot;<%if request.querystring(&quot;&quot;topic&quot;&quot;) = &quot; & topic & &quot; then&quot; & &quot;%&quot; & &quot;>&quot;

ok, where i say &quot; & topic & &quot; i need the output from the var topic to be a string when this code is read. so, i need to do somthing like this: '&quot; & topic & &quot;' . but the problem is, ' is invaled as a quote (or so it seems). so how can i get this to be right. will &quot;&quot;&quot; work at a second quote, plus getting out of the first? ro will it be a whole new kind of quote? any help would be great...

ps. if your wondering the reason i have to do this; &quot;%&quot; & &quot;>&quot;. i'm not sure, it just gave me an error if i didn't
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top