DataList removes the linefeed

  • Thread starter Thread starter Tor Inge Rislaa
  • Start date Start date
T

Tor Inge Rislaa

DataList removes the linefeed



When entering the text below in a field in my database with data type TEXT
it is displayed as below, line by line.


Line1
Line2
Line3


When I connect a data list to the database the data of that TEXT field is
displayed as below

Line1 Line2 Line3. The line feed is gone.



How to show the text as it is entered in the database?



TIRislaa
 
This has nothing to do with the datalist. This has to do with how HTML
treats whitespace. And the way it treats it, is pretty much gets rid of all
white space other then one space characters.

I don't know if this is the best way to fix the problem, but you can replace
all newline characters on the server with '<br>', which will put in line
breaks.
 
Back
Top