Answer posted by Dan Letecky [DayPilot]
4 years ago.

The event text gets HTML-encoded (as a protection against XSS attacks) and then it is treated as HTML. That means ASCII line breaks will be ignored.

If you need to insert a line break, you'll have to use the BeforeEventRender event and build the HTML manually.

Example:

protected void DayPilotCalendar1_BeforeEventRender(object sender, BeforeEventRenderEventArgs e)
{ 
      e.Html = HttpUtility.HtmlEncode(e.Text) + "<br/>" + "Another line";
}

Don't forget the HTML-encode the input text (e.g. using HttpUtility.HtmlEncode() like in the example above).

See also:
https://doc.daypilot.org/calendar/event-customization/

Comment posted by Mike
4 years ago.

This solution did not work for me but I did follow the link you provided and tried the e.Html = e.Text; command with the <br/> already embedded in the text and that worked.
Thanks for your valuable assistance!

Comment posted by Dan Letecky [DayPilot]
4 years ago.

Great, thanks for posting your solution!

This question is more than 1 month old and has been closed. Please create a new question if you have anything to add.