Wrox Programmer Forums
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Dreamweaver (all versions) section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old May 12th, 2004, 08:07 PM
Registered User
Join Date: May 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Line Breaks in ASP pages


I am trying to get a memo field of an MS Access database to show up in an asp with the line breaks (CR) between paragraphs.

The databse contains the breaks because in its former life, the data was displayed on an asp page generated by Frontpage (eeeeh...i know) and it looked fine.

How can i get these missing breaks back!?


Old May 13th, 2004, 02:19 AM
Imar's Avatar
Wrox Author
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts

Hi Remi,

If I understand the problem correctly, simple replace each line break with its HTML equivalent. E.g.:

' Get data from DB first
Dim MyMemoText
MyMemoText = MyRecordSet.Fields("MyMemoColumn").Value

' Now replace stuff:
MyMemoText = Replace(MyMemoText, vbCrLf, "<br />" + vbCrLf)

This code will replace each line break in the database column (vbCrLf) with an XHTML line break and a normal link break.


Imar Spaanjaars
Everyone is unique, except for me.
Old May 13th, 2004, 02:58 PM
Registered User
Join Date: May 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts


Simple problems have simple solutions!



Similar Threads
Thread Thread Starter Forum Replies Last Post
line breaks mister_mister XSLT 14 March 17th, 2008 12:55 PM
Line Breaks in Access? chroniclemaster1 Access 0 February 13th, 2008 04:55 AM
How to do line breaks! Apocolypse2005 Beginning VB 6 2 December 11th, 2006 03:20 PM
Want to detect line breaks conundrum Classic ASP Basics 1 October 3rd, 2003 04:05 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.