ASP vbscript - embedded quotes syntax question 
Author Message
 ASP vbscript - embedded quotes syntax question

In ASP VBScript, I want to write out font color, but since the color
"586470" goes in quotes, I can't get it to work.  I have tried the
following, but it doesn't work because of the embeded quote. What is
the correct syntax ?

response.write "<b><font color="586470">North East</font></b>"

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Sun, 18 Aug 2002 03:00:00 GMT  
 ASP vbscript - embedded quotes syntax question
Just double the Quotes :

Response.write("<b><font color=""#586470"">North East</font></b>")

Max

Quote:

> In ASP vbscript, I want to write out font color, but since the color
> "586470" goes in quotes, I can't get it to work.  I have tried the
> following, but it doesn't work because of the embeded quote. What is
> the correct syntax ?

> response.write "<b><font color="586470">North East</font></b>"

> Sent via Deja.com http://www.deja.com/
> Before you buy.



Sun, 18 Aug 2002 03:00:00 GMT  
 ASP vbscript - embedded quotes syntax question
Use Chr(34) - double quotes
So
response.write "<b><font color=" & Chr(34) & "586470" & Chr(34) & ">etc"
Quote:

> In ASP vbscript, I want to write out font color, but since the color
> "586470" goes in quotes, I can't get it to work.  I have tried the
> following, but it doesn't work because of the embeded quote. What is
> the correct syntax ?

> response.write "<b><font color="586470">North East</font></b>"

> Sent via Deja.com http://www.deja.com/
> Before you buy.



Wed, 21 Aug 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Shell function syntax - Quotes within quotes?

2. stupid question about quotes inside quotes

3. Newbie - Question with ASP Syntax using Request.Form in string

4. ASP ot VBScript / VBScript to ASP

5. Concatenation with embedded double-quote

6. Using an embedded quote in a javascript function call parameter

7. Embedding quotes in string var ?

8. Embedded quotes in HTML

9. Single Quote (Apostrophe) in Embedded Query?

10. how to embed quotes in strings

11. VBScript: MID syntax question

12. VBscript syntax (easy question)

 

 
Powered by phpBB® Forum Software