The code example you gave us will not work no matter how you escape the quotes you can not, as far as I know, embed <cfif> inside the cfset tag. you will need to use iif() instead.
Check out this link for a good explanationon iif:
http://www.fusionauthority
or do something like:
<cfset objNewMail.Body = "Date of registration: #dateformat(now(),"mm/dd/y
<cfif #lcase(FORM.CDIpreconf)# is "yes">
<cfset objNewMail.Body="#objNewMa
</cfif>
Main Topics
Browse All Topics





by: CFDevHeadPosted on 2003-10-27 at 07:32:17ID: 9627500
You can do a couple things; if you want to use double quotes inside double quotes do this: y")# #CHR(13)#
y')# #CHR(13)#
y")# #CHR(13)#
<cfset objNewMail.Body = "Date of registration: #dateformat(now(),"mm/dd/y
<cfif #lcase(FORM.CDIpreconf)# is ""yes"">
Career Development Institute #CHR(13)#</cfif>
">
Or you can single quotes inside double quotes like this:
<cfset objNewMail.Body = "Date of registration: #dateformat(now(),'mm/dd/y
<cfif #lcase(FORM.CDIpreconf)# is 'yes'>
Career Development Institute #CHR(13)#</cfif>
">
Or you can use double quotes inside single quotes like this:
<cfset objNewMail.Body ='Date of registration: #dateformat(now(),"mm/dd/y
<cfif #lcase(FORM.CDIpreconf)# is "yes">
Career Development Institute #CHR(13)#</cfif>
'>
To escape single or double quotes simply do this “Jeff said “”Go away”” ” or ‘Jeff said ‘’Go away’’ ‘