Embarrassingly newbie question:
I have a string
field in my model that contains line breaks.
@Html.DisplayFor(x => x.MultiLineText)
i recommend formatting the output with css instead of using cpu consuming server side strings manipulation like .replace,
just add this style property to render multiline texts :
.multiline
{
white-space: pre-wrap;
}
then
my
multiline
text
newlines will render like br elements, test it here https://snippet.run/xaf4