textbox and array

Discussion in 'ASP General' started by loc2006@gmail.com, Dec 27, 2007.

  1. Guest

    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!
     
    , Dec 27, 2007
    #1
    1. Advertisements

  2. 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.
     
    Bob Barrows [MVP], Dec 27, 2007
    #2
    1. Advertisements

  3. Guest

    On Dec 27, 10:07 am, "Bob Barrows [MVP]" <>
    wrote:
    > 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.
     
    , Dec 27, 2007
    #3
  4. Guest

    On Dec 27, 2:23 pm, wrote:
    > On Dec 27, 10:07 am, "Bob Barrows [MVP]" <>
    > wrote:
    >
    > > 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
    %>
     
    , Dec 28, 2007
    #4
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Hazzard
    Replies:
    2
    Views:
    769
    Yan-Hong Huang[MSFT]
    Jul 23, 2003
  2. =?Utf-8?B?Q2hyaXM=?=
    Replies:
    3
    Views:
    14,257
    Peter Blum
    Mar 30, 2005
  3. Jay

    Rich TextBox / HTML TextBox

    Jay, Apr 28, 2005, in forum: ASP .Net
    Replies:
    5
    Views:
    15,964
    Steve C. Orr [MVP, MCSD]
    Apr 29, 2005
  4. Jay

    Rich TextBox / HTML TextBox

    Jay, Apr 28, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    692
    =?Utf-8?B?TG9yZW5j?=
    Apr 28, 2005
  5. Imran Aziz
    Replies:
    2
    Views:
    11,725
    Imran Aziz
    Sep 5, 2005
  6. =?Utf-8?B?U3JpZGhhcg==?=
    Replies:
    1
    Views:
    2,051
    =?Utf-8?B?UGhpbGxpcCBXaWxsaWFtcw==?=
    Feb 14, 2006
  7. tanmaypatankar
    Replies:
    0
    Views:
    1,217
    tanmaypatankar
    Dec 18, 2007
  8. Mara Guida

    const and array of array (of array ...)

    Mara Guida, Sep 2, 2009, in forum: C Programming
    Replies:
    3
    Views:
    831
    David RF
    Sep 3, 2009
Loading...