Preserving Line breaks

Results 1 to 2 of 2

Thread: Preserving Line breaks

  1. #1
    Thomas S Guest

    Default Preserving Line breaks

    I have a form with a TEXTAREA field that submits the contents to an Access db. I have verified that line breaks that are put into the TEXTAREA are submitted to the db and preserved in the db. <BR><BR>Another script then retrieves the field contents from the db with an SQL statement, but line breaks are gone. What am I doing incorrectly? How can I get the line breaks also from the db? Thanks

  2. #2
    Join Date
    Dec 1969

    Default RE: Preserving Line breaks

    When doing the extract, use the Reaplce() function to replace vbCrLf&#039s with &#060;RB&#062;&#039s (Regular Break Tags. Switched for the message board).<BR><BR>e.g.<BR><BR>Response.Write Replace(rst("fieldname"), vbCrLf, "&#060;RB&#062;")<BR><BR>I also think you could "wrap" the text with &#060;PRE&#062; tags.<BR><BR>Response.Write "&#060;PRE&#062;" & rst("fieldname") & "&#060;/PRE&#062;"<BR><BR>HTH<BR><BR>Jerry

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts