What I have is a long text, content of a blog for example, stored in a database. What I want is that in View to be able to force new lines whenever needed. Right now, the text is stored and viewed in bulk. How can I achieve a split string?
Asp.net core razor force a new line for a saved string in view
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.


Sachin SinghRank #66 · 26.2K reputationPosted Nov 9, 2021, 11:29 PM EST
Marius VasileRank #785 · 2.9K reputationPosted Nov 10, 2021, 1:38 AM EST
Marius VasileRank #785 · 2.9K reputationPosted Nov 10, 2021, 2:05 AM EST
It looks the way intended with css styling
white-space: pre-wrap;