Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Double Quotes Problem

Reply
Thread Tools

Double Quotes Problem

 
 
Evertjan.
Guest
Posts: n/a
 
      09-19-2003
Ice Man wrote on 19 sep 2003 in microsoft.public.inetserver.asp.general:
> I got a "double quote" problem when I try to give a background color
> for the html page
> txtMailBody = "<html bgcolor="#FFCC33">"


txtMailBody = "<html bgcolor='#FFCC33'>"

Can bgcolor be a attribute of the <html> tag, however?


--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
 
Reply With Quote
 
 
 
 
Ice Man
Guest
Posts: n/a
 
      09-19-2003
Hi

I want to send e-mails using an asp page
first I create the mail Object: Set objMail =
Server.CreateObject("CDONTS.NewMail")

After I fill a variable with the html code that will be the mail

txtMailBody = "<html>"
txtMailBody = txtMailBody & "<center>Hi <BR> This is a test"
txtMailBody = txtMailBody & "</html>"

finally I send the mail using the following code:
objMail.Body = txtMailBody
objMail.Send

I got a "double quote" problem when I try to give a background color for the
html page
txtMailBody = "<html bgcolor="#FFCC33">"

Is there a way to accomplish this

Thanks for all


 
Reply With Quote
 
 
 
 
Adrienne
Guest
Posts: n/a
 
      09-19-2003
Gazing into my crystal ball I observed "Evertjan."
<(E-Mail Removed)> writing in news:Xns93FB6E09682F7eejj99@
194.109.133.29:

> Ice Man wrote on 19 sep 2003 in microsoft.public.inetserver.asp.general:
>> I got a "double quote" problem when I try to give a background color
>> for the html page
>> txtMailBody = "<html bgcolor="#FFCC33">"

>
> txtMailBody = "<html bgcolor='#FFCC33'>"
>
> Can bgcolor be a attribute of the <html> tag, however?
>
>


No, it can't. It can be an attribute of the Body element, albeit
depreciated. Best method is to put everything into a style element in the
head element.

txtMailBody = "<html><head><title>Mail Message</title><style type=" & chr
(34) & "text/css" & chr(034) & ">body {background-color:#FFCC33}</style>
</head><body>Email message</body></html>"

--
Adrienne Boswell
Please respond to the group so others can share
http://www.arbpen.com
 
Reply With Quote
 
PB4FUN
Guest
Posts: n/a
 
      09-19-2003

> I got a "double quote" problem when I try to give a background color for

the
> html page
> txtMailBody = "<html bgcolor="#FFCC33">"
>


The solution for a double quote problem is to double your quotes :

txtMailBody = "<html bgcolor=""#FFCC33"">"

Meindert, MCP


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
regex to avoid escaped quotes or double quotes jOhn Ruby 1 01-29-2008 08:31 PM
PHP double quotes inside double quotes MSB Computer Support 11 10-21-2006 01:09 PM
Asp.NET Javascript string, want to pass '(single quotes' within '(single quotes) Chris ASP .Net 1 03-24-2006 09:03 PM
cannot convert parameter from 'double (double)' to 'double (__cdecl *)(double)' error Sydex C++ 12 02-17-2005 06:30 PM
Quotes/Double Quotes in Image Control Chris White ASP .Net 1 09-22-2004 06:22 AM



Advertisments