Detecting Carriage Returns or Line Breaks (textbox)

MoMo
07-06-2002, 01:38 PM
Hello,

I'm working on a dynamic site at the moment which for the time being is using an access database, which allows the user to update his site. One particular problem i'm having is in one of my textarea boxes. For example, the user can update their address by entering it into a textarea. The problem is, when its pulled from the database and read into the page, its reading as one line. For example:

What should be:
Company Name
Company Address
City, State, Zip
(*note: this is how it is being stored in the database - with line breaks)

Is returning as:
Company Name Company Address City, State, Zip

The database seems to be storing it properly, but when I pull it out of the database onto the webpage, it returns it as one line. So, how can I have the information displayed with "line breaks" instead of one continuous line? Thanks in advance.

Derek Stone
07-06-2002, 04:26 PM
Change all line breaks to "<BR>".


sMyText = Replace(sAddress, vbCrLf, "<BR>")
Response.Write sMyText


-CL

MoMo
07-06-2002, 04:58 PM
Thanks a bunch, that works perfectly. It's always the easy stuff that stumps me. :P

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum