Answer the question
In order to leave comments, you need to log in
How to output newline in ASP.NET?
There is an input in which I enter data, which includes a line feed. I display this text using the method @Html.Raw()
However, all newlines disappear, and a message is obtained in one line. How to give the user the ability to translate a line?
Answer the question
In order to leave comments, you need to log in
<input />
does not support line breaks, and therefore does not allow you to enter multiline text.
Use <textarea></textarea>
If there are problems with it, that is, I have a suspicion that you store the lines that you output in the wrong form, try to add to the field in which you store the line[DataType(DataType.MultilineText)]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question