|
| |
|
|
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.
|
|
|
|
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??
|
|
|
|
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.
|
|
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
|
|
|