textbox and array

L

loc2006

I have a multi-line textbox in a classic ASP web page.

Each line looks something like this
1,Joe
2,Jane
3,Bob

Is it possible to use classic ASP to extract each line and store it in
an array? I want to perform an INSERT into an Access table for each
line. I see solutions for ASP.NET but not for classic asp.

thanks!
 
L

loc2006

I apologize for that. Yes, it's a textarea.

Got if figured out. Here is the gist of the code I was looking for

<%
if request.form("students") <> "" then
strStu = Request.Form("students")
arrStu = Split(strstu,vbCrLf)
For intstu = 0 To UBound(arrstu)
arrstu2 = Split(arrstu(intstu),",")
'Response.Write arrstu2(0) & "|" & arrstu2(1)
'construct INSERT SQL
'response.write "<br />"
Next
end if
%>
 

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
474,083
Messages
2,570,591
Members
47,212
Latest member
RobynWiley

Latest Threads

Top