navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

line breaks

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> line breaks
Page: [1]
 
yb2

 

Posts: 653
Joined: 1/30/2006
Status: offline

 
line breaks - 1/30/2006 19:37:25   
Hi,

I'm adding bits of blurb to a database. When I print out the blurb to screen again I would like it to include the linebreaks, carriage returns etc, but it doesn't.

The original linebreaks etc aren't being held when passed to the database.


Does anyone know how I can preserve this information? I'm using ASP and ASP.Net and Access and SQL server2000.
BeTheBall

 

Posts: 6362
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: line breaks - 1/31/2006 0:38:32   
Welcome to OutFront. Try a function like this:

<%
Function InsertBreak(strOutput)
myString = Replace(strOutput, Chr(13), "<BR>")
myString = Replace(myString, Chr(10), "<BR>")
Response.write(myString)
End Function
%>

_____________________________

Duane

Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.

(in reply to yb2)
yb2

 

Posts: 653
Joined: 1/30/2006
Status: offline

 
RE: line breaks - 1/31/2006 18:01:53   
Thanks. Are these the only characters I should look for? I'm not sure if I should be looking for unicode characters too, as my pages are encoded in utf8??

(in reply to BeTheBall)
BeTheBall

 

Posts: 6362
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: line breaks - 1/31/2006 18:30:51   
I think the above should do it. The way your page is coded is probably not relevant. The issue is how the carriage returns are stored in the database. I guess if the above doesn't work, we'll know there is still something left to code for.

_____________________________

Duane

Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.

(in reply to yb2)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> line breaks
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts