Forums

ASP

This topic is locked

How do I replace a DOUBLE carriage return in a textarea?

Posted 12 Sep 2009 16:42:11
1
has voted
12 Sep 2009 16:42:11 Erik De Ruiter posted:
Hi All,

Can anybody help me? I have a textarea where people can type text which is saved to a MS-SQL database and later retrieved and displayed on an ASP webpage. I know how to replace the SINGLE carriage return by using REPLACE(string,vbCrLf,"<br/>" )

But when I enter any text and press return twice to create an empty line and then type some more text it does not work correctly as when displaying the text on my ASP webpage it does not show the empty line in between the two text lines that I typed. It just puts the second text directly under the first text. So for some reason the DOUBLE carriage return is not being picked up by the replace commando.

Do any of you know how to replace a DOUBLE carriage return??? So that when I press enter twice in the textarea it replaces that with <BR/><BR/> or with <P> when I display the text in my ASP webpage.

Thanks for your help!

Erik

Edited by - Erik De Ruiter on 12 Sep 2009  16:42:48

Replies

Replied 16 Sep 2009 21:03:59
16 Sep 2009 21:03:59 Patrick Julicher replied:
Hi Erik,

I do not know how to replace the carriage return as you want. You might want to consider using a HTML Editor instead of a regular Textarea. This would enter the <br> and/or <p> into the database.

Kind regards, Patrick

Reply to this topic