Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display Text Entered In Text Areas Entered With Carriage Return 1

Status
Not open for further replies.

Skittle

ISP
Sep 10, 2002
1,528
US
I have a text area that accepts multiple lines of free format text. A user can of course hit 'enter' or 'carriage return' when filling in the text area to end a line and start typing on the next line.

My user entered text area is stored in an Access database
'Text' field type. If I read the field in on another page via a standard ASp SQL connection, the text is displayed without the 'enter'/'carriage return' ekystrokes formatting the data. They seem to be treated as space characters only.
Why is this and how can I display the text area values in the format the user typed them in?
 
Instead of storing
Code:
textarea.value
in your db, store
Code:
Replace(textarea.value, chr(13), &quot;<BR>&quot;)
Water is not bad as long as it stays out human body ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top