Reading textarea comtent from a form

T

Toni

I want users to submit text in a textarea form, and the information is submitted one
line at a time.

When they submit the form, it will go to an ASP script. How do I parse the textarea form
submission, line-by-line? What is the delimiter between the lines? Am I looking for
vbcrlf?

Thanks so much,

Toni
 
M

Mike Brind [MVP]

McKirahan said:
Will this help?

Dim arrTXT
Dim intTXT
Dim strTXT
strTXT = Request.Form("textarea_name")
arrTXT = Splir(strTXT,vbCrLf)
For intTXT = 0 To UBound(arrTXT)
If Trim(arrTXT(intTXT)) <> "" Then
Response.Write "<li>" & arrTXT(intTXT) '... or whatever ...
End If
Next

Response.Write "<li>" & Server.HTMLEncode(arrTXT(intTXT)) '... or whatever
....
 
T

Toni

Mike Brind said:
Response.Write "<li>" & Server.HTMLEncode(arrTXT(intTXT)) '... or whatever
...

EXACTLY what I need (well, except Splir = Split). THANKS to both of you!!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,143
Latest member
DewittMill
Top