I have a textbox using multiline mode and when I create the stored procedure parameter for updating I use Server.HtmlEncode
on the textbox value. I can copy the content from the data record into Notepad and it shows the spaces where the user has pressed the Enter key for new paragraphs.
When displaying that content on a page (not a textbox for editing; just assigning the content to a Literal control), it has all the text run together.
I have done some searches about using Replace and different escape sequences or Environment.NewLine
. I am still confused about how to have the text display as the user entered it.