How to set new line in RazorEngine

Jul 5, 2011 at 7:19 AM

Hello Team!

Could you help me with my problem:

I am trying to set new line in my file template but it doesn't work.

The template should generate a e-mail as text.

Here is my mail template

Dear @Model.Customer, 
Your periods are:
@foreach (var period in Model.Periods) { @(period + "\n") }


To view the schedule in detail, please to go: @Model.ScheduleLink

 

Thanks, in advance.

Jul 5, 2011 at 7:37 AM

Also I tried "\r\n" it also doesn't work :(

Coordinator
Jul 6, 2011 at 6:43 PM

Have you tried simply:

@foreach (var period in Model.Periods) { @period
}