Click to See Complete Forum and Search --> : New Line Recording in comments


gowans007
09-09-2005, 08:56 AM
Guys,

I have tryed google but I mustn't know the correct terminology.

I am righting comments box in ASP saved to a SQL database, but the comments I save dont include the new lines that you make when entering the comments in the database.

How can I record these and then redisplay them in the ASP viewing page so you can see the new lines, as currently everything is in one long string.

Thanks for your help
Gowans007

buntine
09-10-2005, 06:40 AM
A very common problem. :)

Dim strComments
strComment = Replace(Request.Form("yourCommentsField"), VbCrLf, "<br>")

You will need to replace the newline with the <br> HTML element.

Regards.

gowans007
09-10-2005, 02:18 PM
thanks alot man

buntine
09-10-2005, 10:09 PM
:)