View Full Version : textarea
Bluemonkey
02-13-2003, 10: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
arnyinc
02-13-2003, 01: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.
Bluemonkey
02-13-2003, 02:15 PM
thanks for the help
whammy
02-14-2003, 01: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
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.