I have a textarea in mvc. When data is entered into that and I\'m displaying it back to the user, how do I show the line breaks?
I display like this:
For a slightly different (and, IMHO, better and safer) way of solving the problem, see this answer to a similar question.
Basically, instead of going through the trouble of converting all new line characters to elements, it is as simple as applying the following CSS to the element where you are showing the inputted text:
white-space: pre-line