textbox and array

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!
loc2006 [ Do, 27 Dezember 2007 18:11 ] [ ID #1894473 ]

Re: textbox and array

loc2006 [at] gmail.com wrote:
> I have a multi-line textbox in a classic ASP web page.

multiline?
Do you mean a textarea? You'd better show us the html for this textbox


--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
reb01501 [ Do, 27 Dezember 2007 19:07 ] [ ID #1894474 ]

Re: textbox and array

On Dec 27, 10:07 am, "Bob Barrows [MVP]" <reb01... [at] NOyahoo.SPAMcom>
wrote:
> loc2... [at] gmail.com wrote:
> > I have a multi-line textbox in a classic ASP web page.
>
> multiline?
> Do you mean a textarea? You'd better show us the html for this textbox
>

I apologize for that. Yes, it's a textarea.
loc2006 [ Do, 27 Dezember 2007 23:23 ] [ ID #1894478 ]

Re: textbox and array

On Dec 27, 2:23 pm, loc2... [at] gmail.com wrote:
> On Dec 27, 10:07 am, "Bob Barrows [MVP]" <reb01... [at] NOyahoo.SPAMcom>
> wrote:
>
> > loc2... [at] gmail.com wrote:
> > > I have a multi-line textbox in a classic ASP web page.
>
> > multiline?
> > Do you mean a textarea? You'd better show us the html for this textbox
>
> 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 "
"
Next
end if
%>
loc2006 [ Fr, 28 Dezember 2007 01:25 ] [ ID #1895093 ]
Webserver » microsoft.public.inetserver.asp.general » textbox and array

Vorheriges Thema: Session Variables Unreliable? Please help!
Nächstes Thema: In order?