W
W
wkololo_4ever2014-03-14 19:28:46
ASP.NET
wkololo_4ever, 2014-03-14 19:28:46

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

1 answer(s)
G
grafmania, 2014-03-15
@wkololo_4ever

<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 question

Ask a Question

731 491 924 answers to any question