View Full Version : textarea

02-13-2003, 11:31 AM
how can i keep the fomating of a textarea so if they drop a line in the textarea i need to to remeber that but its needs to go in to a database as well so can i still keep the formating throught a database

02-13-2003, 02:52 PM
When you are displaying the data from the table, print it like this:

response.write replace(RS("field_descripton"), vbcrlf, "<br>")

I guess you could replace the vbcrlf with "<br>" before you insert it into your database and then response.write it out normally, but I don't know if that will cause other problems.

02-13-2003, 03:15 PM
thanks for the help

02-14-2003, 02:21 AM
Your database will store line breaks. No worries there.

Function VbCrLfToBreak(byVal str)
If IsNull(str) Then str = ""
VbCrLfToBreak = Replace(str,vbCrLf,"<br />")
End Function