Computing.Net > Forums > Web Development > line break from database results

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

line break from database results

Reply to Message Icon

Name: pcpak
Date: July 1, 2004 at 11:41:27 Pacific
OS: iis/4.0
CPU/Ram: Pentium II, 256MB
Comment:

I have been revamping my web site in hopes of making it easy for someone to make some changes when I am not around. I am currently developing a page to show an individuals biography. All the information is located in a database where the page gets the info to populate it. At this point I have everything showing up on the page that I want. However, the main text of the biography has several line breaks in it, but when I request the page it doesn't recognize the breaks. If I add the
html tag, it will make the breaks, but I am trying to make this as dummy proof as possible. I am using VB to code the page. Your help is greatly appreciated.

Phil



Sponsored Link
Ads by Google

Response Number 1
Name: FBI Agent
Date: July 1, 2004 at 15:17:38 Pacific
Reply:

so the page is kinda like being opened like a text document? like .txt?

if that is so, and if you are using a windows machine, you could replace the line break with \r\n and that would make all the the text after that go on the next line in php. you kinda have to show it to us though, i think.

FBI_Agent


0

Response Number 2
Name: pcpak
Date: July 1, 2004 at 15:59:01 Pacific
Reply:

I'm using VB, I don't no anything about php, and would prefer to stick to VB for the time due to my inexperience. The body of the bio is a bunch of text with different paragraphs in it. something like this:

blah blah blah. blah blah blah.

blah blah. blah blah....

the text is copied into a memo field of an access database, where I later format the overall biography, ie, name, title, photograph, and bio text into an .asp page.

However, when the bio text is generated in the .asp page, it is all ran together much like this:

blah blah blah. blah blah blah. blah blah. blah blah....

if i were to input a
into the bio text inside the database, it will turn out ok, but I'm looking to automate this portion to allow another person to make any necessary changes when i leave. The following is what i currently have to enter to have it turn out the way i want it to:

blah blah blah. blah blah blah.



blah blah. blah blah....

Due to the site being internal, i'm unable to link you to it to show a better picture. Your help is greatly appreciated


0

Response Number 3
Name: pcpak
Date: July 1, 2004 at 16:04:19 Pacific
Reply:

Sorry I didn't realize the breaks would be translated when I posted.

"if i were to input a 'break'into the bio text..."

the last set of "blahs should have 'breaks as well.

blah blah blah. blah blah blah. 'break'
'break'
blah blah. blah blah....

hope that clears that up.

thanks Phil


0

Response Number 4
Name: FBI Agent
Date: July 1, 2004 at 18:02:17 Pacific
Reply:

well im not familiar with vb, but maybe at the end of "blah blah blah blah" you could put a \r\n like

"blah blah blah blah\r\n" and see if that works.

i think it could work because im pretty sure VB also uses \r\n to make a text line break as php does.

FBI_Agent


0

Response Number 5
Name: pcpak
Date: July 7, 2004 at 03:48:51 Pacific
Reply:

That doesn't seem to work, unless i'm placing it in the wrong place. Here is the following line of code I am using:

<td style="font-family:Arial; font-size:10pt" height="274">" width="222" height="272" align="left"><%= rstSimple.Fields("bio").Value %></td>

the bio field is where the biography is located. Again I'm trying to get the biography's paragraphs to carry through the html.

Thanks,

Phil


0

Related Posts

See More



Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Web Development Forum Home


Sponsored links

Ads by Google


Results for: line break from database results

Results not showing line breaks www.computing.net/answers/webdevel/results-not-showing-line-breaks/1125.html

displaying images from database usi www.computing.net/answers/webdevel/displaying-images-from-database-usi/2625.html

,CSV file import to website | HOW? www.computing.net/answers/webdevel/csv-file-import-to-website-how/3425.html