Formatting newlines using ENCODING=QUOTED-PRINTABLE

Posted on 2006-06-06
Last Modified: 2008-02-01
In the following C# code - I'm writing to a vCalendar the following information the below line works fine however the street, city, state and zip all appear on the same line.

Response.Write("DESCRIPTION;ENCODING=QUOTED-PRINTABLE:" + strDescription + strStreet + strCity + strState + strPostalCode + "\n");

How can I create this so each item is on a seperate line - when I wrote this line like the following:

Response.Write("DESCRIPTION;ENCODING=QUOTED-PRINTABLE:" + strDescription + "\n" + strStreet + "\n" + strCity + "\n" + strState + "\n" + strPostalCode + "\n");

I don't get any compile errors but when I click the link to add the item to my calendar - I get a cannot import vCalendar error then it says:
This error can appear if you have attempted to save a recurring Lunar appointment in iCalendar format.
To avoid this error, set the appointment option to Gregorian instead of Lunar.

Question by:dylanone
    LVL 35

    Expert Comment

    Try Environment.NewLine instead of "\n"

    Response.Write("DESCRIPTION;ENCODING=QUOTED-PRINTABLE:" + strDescription +Environment.NewLine + strStreet + Environment.NewLine + strCity + Environment.NewLine + strState + Environment.NewLine + strPostalCode + Environment.NewLine);

    Author Comment

    It doesn't appear to like that one either

    I still get the error


    Author Comment

    Actually - I just figured this one out in the vCalendar one can use the "=0A" which works for me!

    Author Comment

    I guess this question can be deleted or kept for reference!
    LVL 35

    Expert Comment

    Please post in community support to have this question closed:


    Accepted Solution

    Closed, 50 points refunded.
    Community Support Moderator
    replacement part #xm34

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
    Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    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

    8 Experts available now in Live!

    Get 1:1 Help Now