Task Detail
-
Two way to display the text with line breaks. 1. <p>@Model.ActivityNote.Replace("\n", "<br>")</p> - this will work within C# Razor. 2. <p style="white-space: pre-wrap;">@Model.ActivityNote</p> - this will work for all html since it is a CSS style. I picked this one. The white-space: pre-wrap; style preserves line breaks and spaces, making it a simple way to ensure text is displayed as entered.
10/24/2024 15:11:33