Specifying quotation as literal in Coldfusion

Posted on 2007-10-17
Last Modified: 2013-12-24

how do i specify the literal " (quotation marks) in coldfusion within a variable?

Essentially i want to assign the value: <cfset id="-1"> to a variable


<cfset prefix = "<cfset id = "-1" >">

Obviously the above is illegal, so how do i do this legally? It may seem bizarre what i'm doing but i'm essentially storing coldfusion code in a variable to then write it to file.

Many thanks =)
Question by:paddycobbett
    LVL 142

    Accepted Solution

    what about this:

    <cfset prefix = "<cfset id = ""-1"" >">
    LVL 1

    Author Comment

    thanks =)

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Hi, Even though I have created this Tutorial on My personal Blog, Some people might not able to find my website, So here i am posting it again Today, from the topic it is very clear that i will be showing you here the very basic usage of how we …
    Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now