Forum Moderators: open

Message Too Old, No Replies

Displaying a return on ASP page

         

kevinj

1:10 am on Mar 18, 2003 (gmt 0)

10+ Year Member



I have set up an admin site for my client to add calendar listings for their site. They can write out the content and use HTML as well and it gets written to the database. On the live site it displays the text and HTML fine. I would like to set it up so if they hit the return key when they're entering text, it will be displayed on the live site as a line break, rather than have them have to type in a <br> tag. Does anyone know how to get a return keystroke to write to the database and display on an ASP page?

Thanks.

Woz

1:22 am on Mar 18, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Use Replace(textstring, vbcrlf, "<br>") in your formatting.

If you have double <BR>s and want to change them to <P>s, you can then be a little more complicated and do

textstring = "<p>" & Replace(textstring, "<br><br>", "</p>"vbcrlf"<p>") & "</p>"

Onya
Woz

kevinj

3:22 pm on Mar 18, 2003 (gmt 0)

10+ Year Member



Thanks Woz. Works perfectly!