Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 New Paragraph characters from a web form in Varchar fields

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-12-03 : 07:22:17
Alan writes "If text is entered into a varchar field from a web page text box (like this!) - how do you store and retrieve the 'new paragraph' characters?

My dodgy ASP application simply blobs all the text out in one big long paragraph and it looks a bit rubbish! Yours works fine!

Cheers

Alan


SQLServer version 7"

baldeep
Starting Member

18 Posts

Posted - 2002-12-03 : 10:12:04
It depends on how you're displaying the text. If you're writing it out to a textarea control, then you don't really need to do anything special. If you're trying to display it as HTML text, you'll probably need to do something like replace the carriage returns with <br/> tags. If you're using VBScript, I believe the function is something like Response.Write(Replace(string, vbCrLf, "<br/>")).

--Baldeep

Go to Top of Page

Sitka
Aged Yak Warrior

571 Posts

Posted - 2002-12-03 : 15:52:43
here is some others, hope they show up! Snitz might replace em..



Or these

CRLF = chr(13) & chr(10)
QUOT = chr(34)

Voted best SQL forum nickname...."Tutorial-D"
Go to Top of Page
   

- Advertisement -