Professional Web Applications Themes

Passing Arrays - ASP

Good day folks. I'm probably overlooking the obvious, but asking for feedback none the less =) Can you pass a multidimensional array to a self posting ASP page? arrMDArray=Request.Form("arrAllData") Filler code <input type="hidden" name="arrAllData" value="<%=arrData%>"> If the above isn't possible can it be done breaking the MD Array into separate single arrays? <input type="hidden" name="arrAllData1" value="<%=ubound(arrData,1)%>"> <input type="hidden" name="arrAllData2" value="<%=ubound(arrData,2)%>"> If this second method is allowable, then I guess my next question would be how would I then take the passed single dimension arrays and put them back into a 2-d array? I'm sure the call would be something like ...

  1. #1

    Default Passing Arrays

    Good day folks.

    I'm probably overlooking the obvious, but asking for feedback none the less
    =)

    Can you pass a multidimensional array to a self posting ASP page?

    arrMDArray=Request.Form("arrAllData")
    Filler code
    <input type="hidden" name="arrAllData" value="<%=arrData%>">

    If the above isn't possible can it be done breaking the MD Array into
    separate single arrays?
    <input type="hidden" name="arrAllData1" value="<%=ubound(arrData,1)%>">
    <input type="hidden" name="arrAllData2" value="<%=ubound(arrData,2)%>">

    If this second method is allowable, then I guess my next question would be
    how would I then take the passed single dimension arrays and put them back
    into a 2-d array?
    I'm sure the call would be something like this:
    arrData1=request.form("arrAllData1")
    arrData2=request.form("arrAllData2")
    Insert combining code(which I don't know)

    Thanks from this ASP newbie


    David P. Jessup Guest

  2. #2

    Default Re: Passing Arrays

    How about using session variables? Is that an acceptable option for you?
    If not, we can come up with something.

    Ray at work

    "David P. Jessup" <davidATimntDASHtechDOTcom> wrote in message
    news:OT%23jPb4hDHA.2192TK2MSFTNGP09.phx.gbl...
    > Good day folks.
    >
    > I'm probably overlooking the obvious, but asking for feedback none the
    less
    > =)
    >
    > Can you pass a multidimensional array to a self posting ASP page?
    >
    > arrMDArray=Request.Form("arrAllData")
    > Filler code
    > <input type="hidden" name="arrAllData" value="<%=arrData%>">
    >
    > If the above isn't possible can it be done breaking the MD Array into
    > separate single arrays?
    > <input type="hidden" name="arrAllData1" value="<%=ubound(arrData,1)%>">
    > <input type="hidden" name="arrAllData2" value="<%=ubound(arrData,2)%>">
    >
    > If this second method is allowable, then I guess my next question would be
    > how would I then take the passed single dimension arrays and put them back
    > into a 2-d array?
    > I'm sure the call would be something like this:
    > arrData1=request.form("arrAllData1")
    > arrData2=request.form("arrAllData2")
    > Insert combining code(which I don't know)
    >
    > Thanks from this ASP newbie
    >
    >

    Ray at Guest

  3. #3

    Default Re: Passing Arrays

    Ray,

    I'm trying to stay away from Session for the moment.


    David P. Jessup Guest

  4. #4

    Default Re: Passing Arrays

    > I'm sure the call would be something like this:
    > arrData1=request.form("arrAllData1")
    > arrData2=request.form("arrAllData2")
    > Insert combining code(which I don't know)
    Well testing the above gave me this:
    arrData1 was equal to the count in the array, not the data
    same with arrData2 was just the count.
    I imagine I'm close to answering my question.


    David P. Jessup Guest

Similar Threads

  1. Passing CF Arrays to javascript
    By dxsmith99 in forum Macromedia ColdFusion
    Replies: 2
    Last Post: March 18th, 04:59 PM
  2. Passing arrays to functions
    By Eric Kincl in forum PHP Development
    Replies: 1
    Last Post: November 19th, 09:13 PM
  3. Passing arrays through functions
    By Henry in forum ASP
    Replies: 3
    Last Post: September 15th, 02:44 PM
  4. Passing arrays to SP
    By Gary B in forum Microsoft SQL / MS SQL Server
    Replies: 3
    Last Post: July 10th, 05:49 PM
  5. Passing arrays to a stored procedure
    By Aaron Bertrand - MVP in forum Microsoft SQL / MS SQL Server
    Replies: 0
    Last Post: July 1st, 02:37 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

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 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139