Last post Jan 17, 2021 07:50 AM by Mikesdotnetting
Jan 17, 2021 02:22 AM|maggiemays|LINK
I'm using automapper to update fields in a database. After the database is updated, the data can be viewed via web application. I have one field that contains data for three items. I would like to have each appear on a separate line so that it can be
I have tried adding \n\r , \n, system.environment variable, <br>, <\br>, in between the items. None of these have worked, everything just wraps and it's hard to read.. it looks like newline chars are being removed or ignored. Do you have any suggestions
to make this work?
Jan 17, 2021 07:50 AM|Mikesdotnetting|LINK
Automapper has nothing to do with your issue. It just assigns the existing values of a property on one class to another. It doesn't alter the values.
If you want a new line to appear on the web page, you need to use <br>. You can store that in the text you save in the database, or you can use \n and replace it with <br> when you display the text. If you use a textarea to collect the data instead of a
textbox, the \n is automatically added when the user hits their Enter key when they are typing the text.
Maybe you should provide an example f the code you are using to collect and save the text.