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

line break from database results

Reply to Message Icon

Original Message
Name: pcpak
Date: July 1, 2004 at 11:41:27 Pacific
Subject: line break from database results
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


Report Offensive Message For Removal

Response Number 1
Name: FBI Agent
Date: July 1, 2004 at 15:17:38 Pacific
Subject: line break from database results
Reply: (edit)

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


Report Offensive Follow Up For Removal

Response Number 2
Name: pcpak
Date: July 1, 2004 at 15:59:01 Pacific
Subject: line break from database results
Reply: (edit)

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


Report Offensive Follow Up For Removal

Response Number 3
Name: pcpak
Date: July 1, 2004 at 16:04:19 Pacific
Subject: line break from database results
Reply: (edit)

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


Report Offensive Follow Up For Removal

Response Number 4
Name: FBI Agent
Date: July 1, 2004 at 18:02:17 Pacific
Subject: line break from database results
Reply: (edit)

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


Report Offensive Follow Up For Removal

Response Number 5
Name: pcpak
Date: July 7, 2004 at 03:48:51 Pacific
Subject: line break from database results
Reply: (edit)

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


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: line break from database results

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software