DataList removes the linefeed

  • Thread starter Tor Inge Rislaa
  • 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
 
M

Marina Levit [MVP]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,239
Members
46,828
Latest member
LauraCastr

Latest Threads

Top