• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 577
  • Last Modified:

Formatting newlines using ENCODING=QUOTED-PRINTABLE

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.

0
dylanone
Asked:
dylanone
  • 3
  • 2
1 Solution
 
mrichmonCommented:
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);
0
 
dylanoneAuthor Commented:
It doesn't appear to like that one either

I still get the error

0
 
dylanoneAuthor Commented:
Actually - I just figured this one out in the vCalendar one can use the "=0A" which works for me!
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
dylanoneAuthor Commented:
I guess this question can be deleted or kept for reference!
0
 
mrichmonCommented:
Please post in community support to have this question closed:
http://www.experts-exchange.com/Community_Support/

0
 
ee_ai_constructCommented:
Closed, 50 points refunded.
ee_ai_construct
Community Support Moderator
replacement part #xm34
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now