Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Saving Carriage Return from TextArea in ASP

Status
Not open for further replies.

denaex

Programmer
Nov 2, 2001
6
0
0
US
I am using a form in HTML to record user input into a large textarea. The user may input 20 rows by 80 columns. How do I indicate each rows carriage return before I store this to an access database using ASP and them retrieve the data using ASP with carriage returns when I display and print this form out? Should I be using another means of recording this huge area? Should I ask the user to record one line at a time?

Thanks from the land of Anxious Users
 
You may put html tag <br> when line breaks.You can ignore line break using VB String Constant vbCrLf.
You can use this while recording in database but in this case you enter much more chars (<br>) in your db when line breaks.
Keep clean your db by using this code while printing on screen.

vMessage=Server.HtmlEncode(vMessage)
vMessage = Replace(vMessage, vbCrLf, &quot;<br>&quot;)
Response.Write vMessage
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top