Last post Aug 16, 2017 05:34 AM by Deepak Panchal
Aug 15, 2017 03:11 PM|TmoodASP|LINK
When I input data into database, it preserve the formatting such as new line between input:
my name is
However, when I repopulate the webpage with the data, it output as one long string into this:
hello my name is TmoodASP
I want to preserve the line break. Any assistance would be greatly appreciated!
Aug 15, 2017 08:14 PM|Mikesdotnetting|LINK
You need to replace line breaks with their HTML equivalent:
Aug 16, 2017 05:34 AM|Deepak Panchal|LINK
it looks like you entering the data manually using query in SQL and try to fetch them on a web page.
here , you did not post any code , so we are not getting idea which control you are using to display the data.
I suggest you to put new line character in your string to display the new line properly.
if you are trying to display output in DIV then you need to add <br> tag.
if you are using any control then you can use \n.
if you are working with vb.net then you can use VbCrlf.
you can also use Environment.NewLine.
so it is all depends how you are displaying your data.
so you need to add this in your string to display content in a new line.
it will not display content in new line like it is displaying in SQL.