Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP General (http://www.velocityreviews.com/forums/f65-asp-general.html)
-   -   textbox and array (http://www.velocityreviews.com/forums/t803886-textbox-and-array.html)

loc2006@gmail.com 12-27-2007 05:11 PM

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!

Bob Barrows [MVP] 12-27-2007 06:07 PM

Re: textbox and array
 
loc2006@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.



loc2006@gmail.com 12-27-2007 10:23 PM

Re: textbox and array
 
On Dec 27, 10:07 am, "Bob Barrows [MVP]" <reb01...@NOyahoo.SPAMcom>
wrote:
> loc2...@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@gmail.com 12-28-2007 12:25 AM

Re: textbox and array
 
On Dec 27, 2:23 pm, loc2...@gmail.com wrote:
> On Dec 27, 10:07 am, "Bob Barrows [MVP]" <reb01...@NOyahoo.SPAMcom>
> wrote:
>
> > loc2...@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 "<br />"
Next
end if
%>


All times are GMT. The time now is 03:01 PM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57