Replace vbCrLf with <br>

When you create a textara and then save it to a DB, When you go to use it later on the output page, you will find

that if you used the return key when you wrote your textarea is now on one line. It seems to have foggtten the returns, unless you put it back into a textara.

When in a textarea the return key must be key “vbCrLF” but when in html must be “<br>”. Use this code to switch between the two.

  • replace(inputtext,lookfor,replease with)

<%
Replace(StoredVAR,vbCrLf,"<br>")
%>

Print Friendly, PDF & Email
  1. No comments yet.

  1. No trackbacks yet.